diff options
Diffstat (limited to 'source/blender/blenlib/intern/math_color.c')
-rw-r--r-- | source/blender/blenlib/intern/math_color.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index 2ef29c1ce94..8f5366b6317 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -393,57 +393,6 @@ float linearrgb_to_srgb(float c) return 1.055f * powf(c, 1.0f/2.4f) - 0.055f; } -void srgb_to_linearrgb_v3_v3(float *col_to, float *col_from) -{ - col_to[0] = srgb_to_linearrgb(col_from[0]); - col_to[1] = srgb_to_linearrgb(col_from[1]); - col_to[2] = srgb_to_linearrgb(col_from[2]); -} - -void linearrgb_to_srgb_v3_v3(float *col_to, float *col_from) -{ - col_to[0] = linearrgb_to_srgb(col_from[0]); - col_to[1] = linearrgb_to_srgb(col_from[1]); - col_to[2] = linearrgb_to_srgb(col_from[2]); -} - -/* todo, should these be moved elsewhere?, they dont belong in imbuf */ -void srgb_to_linearrgb_rgba_buf(float *col, int tot) -{ - while(tot--) { - srgb_to_linearrgb_v3_v3(col, col); - col += 4; - } -} - -void linearrgb_to_srgb_rgba_buf(float *col, int tot) -{ - while(tot--) { - linearrgb_to_srgb_v3_v3(col, col); - col += 4; - } -} - -void srgb_to_linearrgb_rgba_rgba_buf(float *col_to, float *col_from, int tot) -{ - while(tot--) { - srgb_to_linearrgb_v3_v3(col_to, col_from); - col_to[3]= col_from[3]; - col_to += 4; - col_from += 4; - } -} - -void linearrgb_to_srgb_rgba_rgba_buf(float *col_to, float *col_from, int tot) -{ - while(tot--) { - linearrgb_to_srgb_v3_v3(col_to, col_from); - col_to[3]= col_from[3]; - col_to += 4; - col_from += 4; - } -} - void minmax_rgb(short c[]) { if(c[0]>255) c[0]=255; |