diff options
Diffstat (limited to 'source/blender/blenlib/BLI_math_color.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_color.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h index c71463da61d..145427ea529 100644 --- a/source/blender/blenlib/BLI_math_color.h +++ b/source/blender/blenlib/BLI_math_color.h @@ -100,6 +100,15 @@ MINLINE void linearrgb_to_srgb_uchar4(unsigned char srgb[4], const float linear[ void BLI_init_srgb_conversion(void); +/**************** Alpha Transformations *****************/ + +MINLINE void premul_to_straight_v4_v4(float straight[4], const float premul[4]); +MINLINE void premul_to_straight_v4(float color[4]); +MINLINE void straight_to_premul_v4_v4(float straight[4], const float premul[4]); +MINLINE void straight_to_premul_v4(float color[4]); +MINLINE void straight_uchar_to_premul_float(float result[4], const unsigned char color[4]); +MINLINE void premul_float_to_straight_uchar(unsigned char *result, const float color[4]); + /************************** Other *************************/ int constrain_rgb(float *r, float *g, float *b); |