AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2004.12.07 12:25 "[Tiff] Fetching pixel data from 4bit tiff", by Dan Field
2004.12.07 11:32 "Re: [Tiff] Fetching pixel data from 4bit tiff", by Joris
2004.12.07 12:38 "Re: [Tiff] Fetching pixel data from 4bit tiff", by Dan Field
2004.12.07 11:48 "Re: [Tiff] Fetching pixel data from 4bit tiff", by Joris
2004.12.07 12:57 "Re: [Tiff] Fetching pixel data from 4bit tiff", by Dan Field
2004.12.07 12:21 "Re: [Tiff] Fetching pixel data from 4bit tiff", by Joris
2004.12.07 13:02 "Re: [Tiff] Fetching pixel data from 4bit tiff", by Joris
2004.12.07 15:50 "Re: [Tiff] Fetching pixel data from 4bit tiff", by Dan Field
2004.12.07 15:52 "Re: [Tiff] Fetching pixel data from 4bit tiff", by Bob Friesenhahn
2004.12.07 17:46 "Re: [Tiff] Fetching pixel data from 4bit tiff", by Dan Field
2004.12.07 17:04 "Re: [Tiff] Fetching pixel data from 4bit tiff", by Bob Friesenhahn
2004.12.07 20:00 "Re: [Tiff] Fetching pixel data from 4bit tiff", by Joris
2004.12.07 20:41 "Re: [Tiff] Fetching pixel data from 4bit tiff", by Bob Friesenhahn

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