TIFF and LibTiff Mail List Archive


2005.09.12 17:12 "[Tiff] extracting 16-bit grayscale from photoshop", by Hoan Chau
2005.09.12 19:12 "Re: [Tiff] extracting 16-bit grayscale from photoshop", by Chris Cox
2005.09.12 19:38 "Re: [Tiff] extracting 16-bit grayscale from photoshop", by Joris Van Damme

2005.09.12 19:38 "Re: [Tiff] extracting 16-bit grayscale from photoshop", by Joris Van Damme


Thus, I don't understand how the data can be interpreted one way in Photoshop and in another way by TiffReadScanline.

I suspect the difficulty here is how to interpret the color space. It's a simple enough word, 'grayscale', but what does it mean...?

Some interpret 'grayscale' to mean RGB grayscale, R=G=B=grayscale. This may seem intuitive, but in fact it is as arbitrary as any other interpretation. Others feel that if no further information is provided, grayscale should be taken to be the perceptually uniform grayscale, the CIE L*a*b* grayscale, L*=grayscale and a*=b*=0. This also may seem intuitive, and in fact it is what seems most intuitive to me personally, but no doubt some will argue that it is as arbitrary as any other interpretation.

There certainly is not much in the TIFF spec itself that creates more certainty. The single out-of-place sentence 'Be aware that the PhotometricInterpretation value of 0 or 1 (grayscale) implies linear data because no gamma is specified.' may be some indication, but still, it replaces the question 'what is grayscale' with the question 'what is linear' and may not help much... Is it R=G=B=grayscale void of gamma? Or should we interpret 'linear' to mean 'perceptually uniform, grayscale as defined by human vision'? Or something else still?

The GrayResponse tags ( ) were an early attempt at curing this problem. This never got broadly supported though. Today, state of the art apps try to solve all this kind of color confusion by embedding ICC profiles ( Some apps read them and apply them, and Photoshop is certainly one of them. However, other apps ignore them, and LibTiff correctly leaves it to the encapsulation application to resolve them (since LibTiff is only a codec, not a color imaging engine).

Thus, it seems possible from your explanation that an ICC profile is there and gets correctly applied by Photoshop, correctly ignored by LibTiff TIFFReadScanline, and incorrectly ignored by this 'PolyView'. You may want to check that. If no ICC profile is embedded, then this must be a simple matter of different interpretation of 'grayscale', and the only thing you can rely on for sure is that LibTiff TIFFReadScanline correctly does no interpretation at all, for above reasons, and that Photoshop's interpretation must be taken to be the industry standard from the same company that also own the TIFF specification itself.

Mind you, I've never seen your image, and I'm not a color expert. I hope this all helps, but I cannot guarante any of my comment is 100% correct.

Joris Van Damme
Download your free TIFF tag viewer for windows here: