From a87c5eb52cd4951b138f518bf12d498bc5e5eb8a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 19 Jan 2012 10:04:51 +0000 Subject: use color conversions functions in more places. also add rgba_float_to_uchar, rgba_uchar_to_float --- source/blender/blenkernel/intern/image_gen.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'source/blender/blenkernel/intern/image_gen.c') diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c index a93d0221cf0..c6cb8c9582a 100644 --- a/source/blender/blenkernel/intern/image_gen.c +++ b/source/blender/blenkernel/intern/image_gen.c @@ -33,7 +33,7 @@ #include "BLI_math_base.h" #include "BLF_api.h" -void BKE_image_buf_fill_color(unsigned char *rect, float *rect_float, int width, int height, float color[4]) +void BKE_image_buf_fill_color(unsigned char *rect, float *rect_float, int width, int height, const float color[4]) { int x, y; @@ -41,22 +41,17 @@ void BKE_image_buf_fill_color(unsigned char *rect, float *rect_float, int width, if(rect_float) { for(y= 0; y