summaryrefslogtreecommitdiff
path: root/libs/freeimage/src/FreeImage/PixelAccess.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/PixelAccess.cpp
parent62a186697df33c96dc1a6dac0f4dfc38652fb96f (diff)
WORD -> uint16_t
Diffstat (limited to 'libs/freeimage/src/FreeImage/PixelAccess.cpp')
-rw-r--r--libs/freeimage/src/FreeImage/PixelAccess.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/freeimage/src/FreeImage/PixelAccess.cpp b/libs/freeimage/src/FreeImage/PixelAccess.cpp
index 185763c3ba..1a6b316980 100644
--- a/libs/freeimage/src/FreeImage/PixelAccess.cpp
+++ b/libs/freeimage/src/FreeImage/PixelAccess.cpp
@@ -77,7 +77,7 @@ FreeImage_GetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value) {
case 16:
{
bits += 2*x;
- WORD *pixel = (WORD *)bits;
+ uint16_t *pixel = (uint16_t *)bits;
if((FreeImage_GetRedMask(dib) == FI16_565_RED_MASK) && (FreeImage_GetGreenMask(dib) == FI16_565_GREEN_MASK) && (FreeImage_GetBlueMask(dib) == FI16_565_BLUE_MASK)) {
value->rgbBlue = (uint8_t)((((*pixel & FI16_565_BLUE_MASK) >> FI16_565_BLUE_SHIFT) * 0xFF) / 0x1F);
value->rgbGreen = (uint8_t)((((*pixel & FI16_565_GREEN_MASK) >> FI16_565_GREEN_SHIFT) * 0xFF) / 0x3F);
@@ -159,7 +159,7 @@ FreeImage_SetPixelColor(FIBITMAP *dib, unsigned x, unsigned y, RGBQUAD *value) {
case 16:
{
bits += 2*x;
- WORD *pixel = (WORD *)bits;
+ uint16_t *pixel = (uint16_t *)bits;
if((FreeImage_GetRedMask(dib) == FI16_565_RED_MASK) && (FreeImage_GetGreenMask(dib) == FI16_565_GREEN_MASK) && (FreeImage_GetBlueMask(dib) == FI16_565_BLUE_MASK)) {
*pixel = ((value->rgbBlue >> 3) << FI16_565_BLUE_SHIFT) |
((value->rgbGreen >> 2) << FI16_565_GREEN_SHIFT) |