X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/234fedd2d3f7bb618e1b640ca29ad73545c2129b..82bf96f54849a84b449d1b9f0fcff8f28649b07e:/src/common/imagjpeg.cpp diff --git a/src/common/imagjpeg.cpp b/src/common/imagjpeg.cpp index c10f764da4..31e069e53a 100644 --- a/src/common/imagjpeg.cpp +++ b/src/common/imagjpeg.cpp @@ -22,10 +22,10 @@ #include "wx/log.h" #include "wx/app.h" #include "wx/intl.h" + #include "wx/bitmap.h" + #include "wx/module.h" #endif -#include "wx/bitmap.h" - // NB: Some compilers define boolean type in Windows headers // (e.g. Watcom C++, but not Open Watcom). // This causes a conflict with jmorecfg.h header from libjpeg, so we have @@ -46,7 +46,6 @@ extern "C" #include "wx/filefn.h" #include "wx/wfstream.h" -#include "wx/module.h" // For memcpy #include @@ -209,13 +208,13 @@ static inline void wx_cmyk_to_rgb(unsigned char* rgb, const unsigned char* cmyk) register int c; c = k + k2 * (255 - cmyk[0]) / 255; - rgb[0] = (c > 255) ? 0 : (255 - c); + rgb[0] = (unsigned char)((c > 255) ? 0 : (255 - c)); c = k + k2 * (255 - cmyk[1]) / 255; - rgb[1] = (c > 255) ? 0 : (255 - c); + rgb[1] = (unsigned char)((c > 255) ? 0 : (255 - c)); c = k + k2 * (255 - cmyk[2]) / 255; - rgb[2] = (c > 255) ? 0 : (255 - c); + rgb[2] = (unsigned char)((c > 255) ? 0 : (255 - c)); } // temporarily disable the warning C4611 (interaction between '_setjmp' and