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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-11-26 21:38:03 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-11-26 21:38:03 +0400
commitc71ab7e774aa17651d4604110eba894dc1c009ba (patch)
treefc77b577adacded85c8c6a58ea82798e747c5d5d /source/blender/blenkernel/intern
parent233e0b24721a83000f7a56a88dc00bc2dbca3362 (diff)
Fix wrong color space used for generated float images
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/image.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index e4b9edacc7e..f09f128e874 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -663,6 +663,13 @@ static ImBuf *add_ibuf_size(unsigned int width, unsigned int height, const char
BKE_image_buf_fill_color(rect, rect_float, width, height, color);
}
+ if (rect_float) {
+ /* both byte and float buffers are filling in sRGB space, need to linearize float buffer after BKE_image_buf_fill* functions */
+
+ IMB_buffer_float_from_float(rect_float, rect_float, ibuf->channels, IB_PROFILE_LINEAR_RGB, IB_PROFILE_SRGB,
+ ibuf->flags & IB_cm_predivide, ibuf->x, ibuf->y, ibuf->x, ibuf->x);
+ }
+
return ibuf;
}