summaryrefslogtreecommitdiff
path: root/libs/freeimage/src/FreeImage/PluginJPEG.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 17:06:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 17:06:04 +0300
commit1039b2829a264280493ba0fa979214fe024dc70c (patch)
tree8fa6a60eb46627582c372b56a4a1d4754d6732c3 /libs/freeimage/src/FreeImage/PluginJPEG.cpp
parent62a186697df33c96dc1a6dac0f4dfc38652fb96f (diff)
WORD -> uint16_t
Diffstat (limited to 'libs/freeimage/src/FreeImage/PluginJPEG.cpp')
-rw-r--r--libs/freeimage/src/FreeImage/PluginJPEG.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/freeimage/src/FreeImage/PluginJPEG.cpp b/libs/freeimage/src/FreeImage/PluginJPEG.cpp
index dc76574723..23c13deef2 100644
--- a/libs/freeimage/src/FreeImage/PluginJPEG.cpp
+++ b/libs/freeimage/src/FreeImage/PluginJPEG.cpp
@@ -1308,7 +1308,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) {
jpeg_read_scanlines(&cinfo, buffer, 1);
for(unsigned x = 0; x < cinfo.output_width; x++) {
- WORD K = (WORD)src[3];
+ uint16_t K = (uint16_t)src[3];
dst[FI_RGBA_RED] = (uint8_t)((K * src[0]) / 255); // C -> R
dst[FI_RGBA_GREEN] = (uint8_t)((K * src[1]) / 255); // M -> G
dst[FI_RGBA_BLUE] = (uint8_t)((K * src[2]) / 255); // Y -> B
@@ -1408,7 +1408,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void
const char *sError = "only 24-bit RGB, 8-bit greyscale/palette or 32-bit CMYK bitmaps can be saved as JPEG";
FREE_IMAGE_COLOR_TYPE color_type = FreeImage_GetColorType(dib);
- WORD bpp = (WORD)FreeImage_GetBPP(dib);
+ uint16_t bpp = (uint16_t)FreeImage_GetBPP(dib);
if ((bpp != 24) && (bpp != 8) && !(bpp == 32 && (color_type == FIC_CMYK))) {
throw sError;