- 2007.01.31 16:56 "Re: [Tiff] 16bit grayscale with colormap", by Toby Thain
- 2007.01.31 17:01 "Re: [Tiff] 16bit grayscale with colormap", by Bob Friesenhahn
- 2007.01.31 17:31 "Re: [Tiff] 16bit grayscale with colormap", by Joris Van Damme
- 2007.01.31 17:53 "Re: [Tiff] 16bit grayscale with colormap", by Bob Friesenhahn
2007.01.31 17:01 "Re: [Tiff] 16bit grayscale with colormap", by Bob Friesenhahn
I deal with 16bit grayscale TIFFs. The files originate from a 12bit CCD, so the linear conversion 16bit->8bit turns my image almost black.
To cope with that, I would like to add a ColorMap into the TIFF. For testing, I altered an existing 16bit file:
- photometrics = 3 (ColorMap)
- added a colormap (tag 0140), length: 3*2^16= 196608 bytes
Porgrams either refuse this file (ImageMagick viewer) or ignore the colormap and treat as if without (ImageJ).
Is this a proper interpretation of the TIFF specs (TIFF6 specs p.23 allow only 4/8 bits per sample -- why?)? How can I work with the data in terms of leaving original values untouched and just change a LUT/ColorMap/whatever?
Give development GraphicsMagick 1.2 (built with 16-bit quantums) a try. I have written and read TIFFs with 64K colormap entries (16 bit indexes) using development GraphicsMagick 1.2. As I recall, the writing was extremely slow since the colormap was deduced from a truecolor image but the reading is pretty quick.
Are you able to provide a sample file?
Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/