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:
authorJanne Karhu <jhkarh@gmail.com>2010-10-13 17:10:35 +0400
committerJanne Karhu <jhkarh@gmail.com>2010-10-13 17:10:35 +0400
commit62f4d613d06fad1bad95b4ec5e5199425a23d684 (patch)
tree6b37ddb062f0261bcbba903fc3d1572c0fdc7713 /source/blender/nodes/intern/CMP_nodes
parent1eda2c85949ed0fa67d3026e078588d0820826ad (diff)
Fix for [#24208] ObjectId information is wrong when read from multilayer exr
* non-rgba passes shouldn't use color correction
Diffstat (limited to 'source/blender/nodes/intern/CMP_nodes')
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_image.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_image.c b/source/blender/nodes/intern/CMP_nodes/CMP_image.c
index 9309d2939db..c99496d9664 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_image.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_image.c
@@ -77,25 +77,31 @@ static CompBuf *node_composit_get_image(RenderData *rd, Image *ima, ImageUser *i
/* now we need a float buffer from the image
* with matching color management */
- if(rd->color_mgt_flag & R_COLOR_MANAGEMENT) {
- if(ibuf->profile != IB_PROFILE_NONE) {
- rect= ibuf->rect_float;
+ if(ibuf->channels == 4) {
+ if(rd->color_mgt_flag & R_COLOR_MANAGEMENT) {
+ if(ibuf->profile != IB_PROFILE_NONE) {
+ rect= ibuf->rect_float;
+ }
+ else {
+ rect= MEM_mapallocN(sizeof(float) * 4 * ibuf->x * ibuf->y, "node_composit_get_image");
+ srgb_to_linearrgb_rgba_rgba_buf(rect, ibuf->rect_float, ibuf->x * ibuf->y);
+ alloc= TRUE;
+ }
}
else {
- rect= MEM_mapallocN(sizeof(float) * 4 * ibuf->x * ibuf->y, "node_composit_get_image");
- srgb_to_linearrgb_rgba_rgba_buf(rect, ibuf->rect_float, ibuf->x * ibuf->y);
- alloc= TRUE;
+ if(ibuf->profile == IB_PROFILE_NONE) {
+ rect= ibuf->rect_float;
+ }
+ else {
+ rect= MEM_mapallocN(sizeof(float) * 4 * ibuf->x * ibuf->y, "node_composit_get_image");
+ linearrgb_to_srgb_rgba_rgba_buf(rect, ibuf->rect_float, ibuf->x * ibuf->y);
+ alloc= TRUE;
+ }
}
}
else {
- if(ibuf->profile == IB_PROFILE_NONE) {
- rect= ibuf->rect_float;
- }
- else {
- rect= MEM_mapallocN(sizeof(float) * 4 * ibuf->x * ibuf->y, "node_composit_get_image");
- linearrgb_to_srgb_rgba_rgba_buf(rect, ibuf->rect_float, ibuf->x * ibuf->y);
- alloc= TRUE;
- }
+ /* non-rgba passes can't use color profiles */
+ rect= ibuf->rect_float;
}
/* done coercing into the correct color management */