[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47054] trunk/blender/source/blender/ blenkernel/intern/image.c: Fix #31538: Wrong colors after reloading file with exr image

Sergey Sharybin sergey.vfx at gmail.com
Sat May 26 19:04:52 CEST 2012


Revision: 47054
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47054
Author:   nazgul
Date:     2012-05-26 17:04:51 +0000 (Sat, 26 May 2012)
Log Message:
-----------
Fix #31538: Wrong colors after reloading file with exr image

Issue was caused by generated images had got no profile set (IB_PROFILE_NONE)
which confused OpenEXR saver (which makes sRGB conversion for profiles which
are not linear).

Actually this is much deeper issue which would require the whole color pipeline
workflow (which would happen at some point when currently urgent stuff is resolved),
but having correct profile set for generated images would still be helpful.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/image.c

Modified: trunk/blender/source/blender/blenkernel/intern/image.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/image.c	2012-05-26 16:04:31 UTC (rev 47053)
+++ trunk/blender/source/blender/blenkernel/intern/image.c	2012-05-26 17:04:51 UTC (rev 47054)
@@ -592,10 +592,12 @@
 	if (floatbuf) {
 		ibuf = IMB_allocImBuf(width, height, depth, IB_rectfloat);
 		rect_float = (float *)ibuf->rect_float;
+		ibuf->profile = IB_PROFILE_LINEAR_RGB;
 	}
 	else {
 		ibuf = IMB_allocImBuf(width, height, depth, IB_rect);
 		rect = (unsigned char *)ibuf->rect;
+		ibuf->profile = IB_PROFILE_SRGB;
 	}
 	
 	BLI_strncpy(ibuf->name, name, sizeof(ibuf->name));




More information about the Bf-blender-cvs mailing list