2005.03.30 19:41 "[Tiff] reading 16 bit grayscale", by Rick Schumeyer

2005.03.30 19:59 "Re: [Tiff] reading 16 bit grayscale", by Joris Van Damme

how can I use libtiff to read a 16 bit grayscale tiff? I don't want to display it, and I don't want it converted to 8-bit. I just want access to the 16-bit values.

My guess is that I should use something like TIFFReadScanLine. Is this correct? Is there a way to read the entire image in one call?

TIFFReadScanline would be a valid way to do it, if the image contains strips, as opposed to tiles. Best read http://www.remotesensing.org/libtiff/libtiff.html#Scanlines, and the next few topics on that page.

Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html