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:
authorMatt Ebb <matt@mke3.net>2009-10-21 04:33:08 +0400
committerMatt Ebb <matt@mke3.net>2009-10-21 04:33:08 +0400
commit908061378c9dd56bd2f1408ac0d3072c5464c72d (patch)
tree50b0a4ab2a435385177cfa6024e4f796169e9987 /source/blender/nodes
parentdaa1e5449db6de63e1dc15a0362722716c163b2d (diff)
* fix for colour management, compositor image node wasn't working correctly. There are a few other issues around here I need to get to eventually as well..
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_image.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_image.c b/source/blender/nodes/intern/CMP_nodes/CMP_image.c
index 5e22f5cf016..89a3072ac8d 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_image.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_image.c
@@ -67,11 +67,15 @@ static CompBuf *node_composit_get_image(RenderData *rd, Image *ima, ImageUser *i
if (rd->color_mgt_flag & R_COLOR_MANAGEMENT) {
if (ibuf->profile == IB_PROFILE_NONE) {
- if (ibuf->rect_float != NULL) {
+ /* if float buffer already exists = already linear */
+ /* else ... */
+ if (ibuf->rect_float == NULL) {
imb_freerectfloatImBuf(ibuf);
+ ibuf->profile = IB_PROFILE_SRGB;
+ IMB_float_from_rect(ibuf);
+ } else {
+ ibuf->profile = IB_PROFILE_LINEAR_RGB;
}
- ibuf->profile = IB_PROFILE_SRGB;
- IMB_float_from_rect(ibuf);
}
} else {
if (ibuf->profile == IB_PROFILE_SRGB) {