2001.07.20 16:52 "RE: LZW TIFFReadScanline woes", by Sean Finn
Sorry, I should have put this in the original question:
I have a routine that skips through the Tiff file, let's call it TSeek(int lines). It basically looks like this:
void TSeek(int lines)
for(int i=0; i < lines; ++i)
// buf is a previously allocated 1-scanline size'd buffer
TIFFReadScanlines(m_tif, buf, 1);
This allows me to walk through the compressed file without worrying about random access. The sub-sampled images, on further inspection, seem to have a problem when the Strip changes. There is either a duplicated scanline or a missing one. My seek routine is the likely suspect, other than there are no problems using the same code in an uncompressed file.
I have a work-around of uncompressed the whole image into a local buffer, and then skipping around in that to retrieve my sub-sampling. This is fine (inefficient, but fine) until I get to a large file (we have a couple 60 MB).
Thanks for everyone's help,
From: email@example.com [mailto:firstname.lastname@example.org] Sent: Friday, July 20, 2001 11:50 AM
To: Bruno LEDOUX
Cc: Sean Finn; email@example.com
Subject: Re: LZW TIFFReadScanline woes