Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-01-19 20:22:22 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-01-19 20:22:22 +0400
commit1d46bbef7e07d70cf44d304f261bc5a1e8056f24 (patch)
treebd16f305b2d41099aa3237964dd85d918ddf16e8 /source/blender/blenlib/BLI_math_color.h
parent167999304ea0053532e84aff0c7fd0d1ce002a6c (diff)
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.
Diffstat (limited to 'source/blender/blenlib/BLI_math_color.h')
-rw-r--r--source/blender/blenlib/BLI_math_color.h3
1 files changed, 3 insertions, 0 deletions
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 *************************/