Page MenuHome

16-bit tiffs are tagged incorrectly as sRGB
Closed, ArchivedPublicPATCH

Description

Hi,

currently the tiff code assumes 16bit tiffs are linear, but sets imbuf->profile to sRGB,
leading to the inconsistency reported here:

http://lists.blender.org/pipermail/bf-committers/2012-May/036598.html

The attached patch sets the profile to linear for bpp>=16, leading to
consistent display in the image editor and viewer node.

till then, David.

Event Timeline

Note:
There is another issue, the assumption that 16bit tiffs are linear is wrong
more often than not: Photoshop and Nuke write gamma encoded 16bit files
by default, and the TIFF spec default TransferFunction is gamma 2.2 (close
to sRGB).

The correct solution would be to completely implement the color transforms
defined in the TIFF spec, but that is complex. I think that the best solution for
now might be to assume sRGB in 16bit files, and I believe that the old code
was trying to do exactly that by setting the profile (which does not work that way).

Attached is a patch which does it in a way that works.

Sergey Sharybin (sergey) changed the task status from Unknown Status to Unknown Status.Apr 3 2015, 12:30 PM
Sergey Sharybin (sergey) claimed this task.

The whole color management pipeline was changed now. it's still possible color space would be detected wrong by default but it's always possible to correct it afterwards. Don't see reason of this patch now actually.

Thanks for it anyway!