[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32034] trunk/blender/source/blender/nodes /intern/CMP_nodes/CMP_image.c: Error reported by Daniel Salazar, Compositor color is wrong since my fix.

Campbell Barton ideasman42 at gmail.com
Tue Sep 21 03:40:20 CEST 2010


Revision: 32034
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32034
Author:   campbellbarton
Date:     2010-09-21 03:40:20 +0200 (Tue, 21 Sep 2010)

Log Message:
-----------
Error reported by Daniel Salazar, Compositor color is wrong since my fix.
this is because of fairly confusing logic, when an SRGB image has a float buffer added its always LINEAR, so we have to account for this elsewhere.
So the conversion from byte to float works like this:
* NONE -> NON-LINEAR
* SRGB/LINEAR -> LINEAR
...but none change the profile variable.

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-09-20 21:57:29 UTC (rev 32033)
+++ trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c	2010-09-21 01:40:20 UTC (rev 32034)
@@ -78,7 +78,7 @@
 	/* 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_LINEAR_RGB) {
+		if(ibuf->profile != IB_PROFILE_NONE) {
 			rect= ibuf->rect_float;
 		}
 		else {
@@ -88,7 +88,7 @@
 		}
 	}
 	else {
-		if(ibuf->profile != IB_PROFILE_LINEAR_RGB) {
+		if(ibuf->profile == IB_PROFILE_NONE) {
 			rect= ibuf->rect_float;
 		}
 		else {





More information about the Bf-blender-cvs mailing list