From 1d46bbef7e07d70cf44d304f261bc5a1e8056f24 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 19 Jan 2012 16:22:22 +0000 Subject: Fix issue in recent color commits, was still doing a multiplication by 255 too many, also don't check uchar range after casting to int, this can still cause overflow with large float values. --- source/blender/blenlib/BLI_math_color.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/blenlib/BLI_math_color.h') diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h index 453f1258272..f4d6882b5d8 100644 --- a/source/blender/blenlib/BLI_math_color.h +++ b/source/blender/blenlib/BLI_math_color.h @@ -91,6 +91,9 @@ MINLINE void linearrgb_to_srgb_v4(float srgb[4], const float linear[4]); MINLINE void srgb_to_linearrgb_predivide_v4(float linear[4], const float srgb[4]); MINLINE void linearrgb_to_srgb_predivide_v4(float srgb[4], const float linear[4]); +MINLINE void linearrgb_to_srgb_uchar3(unsigned char srgb[3], const float linear[3]); +MINLINE void linearrgb_to_srgb_uchar4(unsigned char srgb[4], const float linear[4]); + void BLI_init_srgb_conversion(void); /************************** Other *************************/ -- cgit v1.2.3