summaryrefslogtreecommitdiffstats
path: root/chalk/colorspaces
diff options
context:
space:
mode:
Diffstat (limited to 'chalk/colorspaces')
-rw-r--r--chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.cc4
-rw-r--r--chalk/colorspaces/gray_u8/kis_gray_colorspace.cc4
-rw-r--r--chalk/colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc4
3 files changed, 6 insertions, 6 deletions
diff --git a/chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.cc b/chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.cc
index b24c48b3..43bdf40f 100644
--- a/chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.cc
+++ b/chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.cc
@@ -404,8 +404,8 @@ void KisGrayU16ColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowS
TQ_UINT16 srcColor = src[channel];
TQ_UINT16 dstColor = dst[channel];
- srcColor = kMin(((UINT16_MAX - dstColor) * (UINT16_MAX + 1u)) / (srcColor + 1u), UINT16_MAX);
- srcColor = kClamp(UINT16_MAX - srcColor, 0u, UINT16_MAX);
+ srcColor = kMin(((UINT16_MAX - dstColor) * (UINT16_MAX + 1u)) / (srcColor + 1u), (unsigned)UINT16_MAX);
+ srcColor = kClamp((unsigned)UINT16_MAX - srcColor, 0u, (unsigned)UINT16_MAX);
TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);
diff --git a/chalk/colorspaces/gray_u8/kis_gray_colorspace.cc b/chalk/colorspaces/gray_u8/kis_gray_colorspace.cc
index 7968e311..989cc2c5 100644
--- a/chalk/colorspaces/gray_u8/kis_gray_colorspace.cc
+++ b/chalk/colorspaces/gray_u8/kis_gray_colorspace.cc
@@ -746,8 +746,8 @@ void KisGrayColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStri
TQ_UINT8 srcColor = src[channel];
TQ_UINT8 dstColor = dst[channel];
- srcColor = kMin(((UINT8_MAX - dstColor) * (UINT8_MAX + 1)) / (srcColor + 1), UINT8_MAX);
- srcColor = kClamp(UINT8_MAX - srcColor, 0u, UINT8_MAX);
+ srcColor = kMin(((UINT8_MAX - dstColor) * (UINT8_MAX + 1u)) / (srcColor + 1u), (unsigned)UINT8_MAX);
+ srcColor = kClamp((unsigned)UINT8_MAX - srcColor, 0u, (unsigned)UINT8_MAX);
TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend);
diff --git a/chalk/colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc b/chalk/colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc
index 75aa6649..40198c91 100644
--- a/chalk/colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc
+++ b/chalk/colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc
@@ -444,8 +444,8 @@ void KisRgbU16ColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowSt
TQ_UINT16 srcColor = src[channel];
TQ_UINT16 dstColor = dst[channel];
- srcColor = kMin(((UINT16_MAX - dstColor) * (UINT16_MAX + 1u)) / (srcColor + 1u), UINT16_MAX);
- srcColor = kClamp(UINT16_MAX - srcColor, 0u, UINT16_MAX);
+ srcColor = kMin(((UINT16_MAX - dstColor) * (UINT16_MAX + 1u)) / (srcColor + 1u), (unsigned)UINT16_MAX);
+ srcColor = kClamp((unsigned)UINT16_MAX - srcColor, 0u, (unsigned)UINT16_MAX);
TQ_UINT16 newColor = UINT16_BLEND(srcColor, dstColor, srcBlend);