[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32448] trunk/blender/source/blender/nodes /intern/CMP_nodes/CMP_image.c: Fix for [#24208] ObjectId information is wrong when read from multilayer exr
Janne Karhu
jhkarh at gmail.com
Wed Oct 13 15:10:35 CEST 2010
Revision: 32448
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32448
Author: jhk
Date: 2010-10-13 15:10:35 +0200 (Wed, 13 Oct 2010)
Log Message:
-----------
Fix for [#24208] ObjectId information is wrong when read from multilayer exr
* non-rgba passes shouldn't use color correction
Modified Paths:
--------------
trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c
Modified: trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c
===================================================================
--- trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c 2010-10-13 12:27:40 UTC (rev 32447)
+++ trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c 2010-10-13 13:10:35 UTC (rev 32448)
@@ -77,25 +77,31 @@
/* 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 */
More information about the Bf-blender-cvs
mailing list