2004.12.07 12:25 "[Tiff] Fetching pixel data from 4bit tiff", by Dan Field

2004.12.07 20:41 "Re: [Tiff] Fetching pixel data from 4bit tiff", by Bob Friesenhahn

You should use TIFFReadScanline() to read each scanline into memory you have allocated.

Good advice. Especially if you plan to next explain how tiling issues require another low-level approach. And explain that the interface will still work only with these 4bit images, or either explain planarconfiguration issues, subsampling issues, all color convertion issues, etc.

I did not find it necessary because I assumed that you would clarify all of these issues. Alternatively, he could read the documentation or look at the sample utility code which comes with libtiff.

Most monochrome images are quite large, so expanding them to RGBA is quite wasteful of memory, and slow.

Bob

======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen