2018.05.09 03:45 "[Tiff] Question about transfer function", by Larry Gritz

2018.05.09 13:05 "Re: [Tiff] Question about transfer function", by Bob Friesenhahn

On Tue, 8 May 2018, Larry Gritz wrote:

I'm embarrassed to say that today I stumbled on a statement in the TIFF 6.0 spec that had somehow eluded me previously in nearly 30 years of dealing with TIFF files. To wit:

"Be aware that the PhotometricInterpretation value of 0 or 1 (grayscale) implies linear data because no gamma is specified. The PhotometricInterpretation value of 2 (RGB data) specifies the NTSC gamma of 2.2 as a default. If data is written as something other than the default, then a GrayResponseCurve field or a TransferFunction field must be present to define the deviation. For grayscale data, be sure that the densities in the GrayResponseCurve are consistent with the PhotometricInterpretation field and the HalftoneHints field."

In the real world of semi-random sources and software, it is most likely that a grayscale image has a gamma of approximately 2.2. Lots of software uses Rec.601 or Rec.709 Luma calculations to produce a gray image from RGB, or might even just select one of the RGB channels (e.g. green) and use it as the gray channel. GraphicsMagick still uses Rec.601 Luma transforms by default although it is likely that Rec.709 is a better choice.

TIFF 6.0 is very old. Since then ICC color profiles and other means have emerged to provide colorspace information.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/