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 d620fc5..97278f1 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 932a494..2cb30b8 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];