diff options
Diffstat (limited to 'source/blender/imbuf/intern/scaling.c')
-rw-r--r-- | source/blender/imbuf/intern/scaling.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c index ff92ce15811..1c0b47f7942 100644 --- a/source/blender/imbuf/intern/scaling.c +++ b/source/blender/imbuf/intern/scaling.c @@ -332,9 +332,9 @@ MINLINE void premul_ushort_to_straight_uchar(unsigned char *result, const unsign else { unsigned short alpha = color[3] / 256; - result[0] = USHORTTOUCHAR(color[0] / alpha * 256); - result[1] = USHORTTOUCHAR(color[1] / alpha * 256); - result[2] = USHORTTOUCHAR(color[2] / alpha * 256); + result[0] = USHORTTOUCHAR((ushort)(color[0] / alpha * 256)); + result[1] = USHORTTOUCHAR((ushort)(color[1] / alpha * 256)); + result[2] = USHORTTOUCHAR((ushort)(color[2] / alpha * 256)); result[3] = USHORTTOUCHAR(color[3]); } } |