fix [#32626] TIFF renders are limited to 8 bit even when we choose 16.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 24 Sep 2012 01:13:13 +0000 (01:13 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 24 Sep 2012 01:13:13 +0000 (01:13 +0000)
this is a regression with color management, TIFF's were always being written as 8bit

however the float buffer is assumed to be linear when converting from float to 16bit pixels per channel, so support for color management might need to be added here.

source/blender/blenkernel/intern/image.c
source/blender/imbuf/intern/tiff.c

index d620fc50e86decd2ccfcb676ef2d7136aafe8e8c..97278f14d83a57d0e9979026662ac805a1e4a542 100644 (file)
@@ -1037,6 +1037,7 @@ int BKE_imtype_supports_float(const char imtype)
                case R_IMF_IMTYPE_CINEON:
                case R_IMF_IMTYPE_DPX:
                case R_IMF_IMTYPE_RADHDR:
+               case R_IMF_IMTYPE_TIFF:  /* uses the float buffer to write 16bits per channel */
                case R_IMF_IMTYPE_OPENEXR:
                case R_IMF_IMTYPE_MULTILAYER:
                        return TRUE;
index 932a4941a0a749aa711334a23fcc6158c5c04c75..2cb30b84a090b5ef5b491ddbba4480dfea7c089f 100644 (file)
@@ -790,6 +790,7 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
                                /* convert from float source */
                                float rgb[4];
                                
+                               /* TODO - support color management */
                                linearrgb_to_srgb_v3_v3(rgb, &fromf[from_i]);
 
                                rgb[3] = fromf[from_i + 3];