2007.01.18 20:47 "Re: [Tiff] tif_getimage - using colormap even if photometricinterpwrong", by Joris Van Damme
Bottom line: I think the change would cause more problems than it would solve.
It might solve the specific case they are describing (sounds like mapping data), but would likely create more problems for the larger TIFF user community.
I agree. This would yet again be a step away from actual TIFF. In actual TIFF, tags that don't matter, are ignored, and that includes the Colormap tag for Photometric MINISBLACK like it includes the T4Options tag for Compression JPEG and the Subsampling tags for Photometric RGB.
I would recommend to solve this on the caller level. The customer with this particular problem can use TIFFReadEncodedXxx, read the actual tag value of Colormap (which might not currently be support without changes, but could rightly be considered useful in a general tag access interface regardless of image interpretation), and apply the Colormap next any way he sees fit for his purpose.
The main thing is, you can rightly make the codec behave robust on wrong images. But it is not right to make it behave wrong on whatever image. That creates more problems further down the road, then it solves. Taking a Colormap into account when Photometric is MINISBLACK is just that, it is just wrong.
Joris Van Damme
Download your free TIFF tag viewer for windows here: