diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-07 18:54:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-07 18:54:10 +0300 |
commit | f62b826533422e5de3b08601e5511c233deda529 (patch) | |
tree | c9d57326dfe030ba9c39060c0bdf1d3933e4c81b /source/blender/imbuf/intern | |
parent | b0b2a478539500b112a0f4b002a9d3d2123be0d0 (diff) | |
parent | 905eeb0bc7f46efb95cb5450cc6c2ec27f02730c (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/filter.c | 1 | ||||
-rw-r--r-- | source/blender/imbuf/intern/scaling.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c index 38609d0a342..27711618cee 100644 --- a/source/blender/imbuf/intern/filter.c +++ b/source/blender/imbuf/intern/filter.c @@ -34,6 +34,7 @@ #include "MEM_guardedalloc.h" #include "BLI_utildefines.h" +#include "BLI_math_base.h" #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" 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]); } } |