1994.05.27 20:15 "handling a strip size that's too big", by Craig Tulig

1994.05.27 20:49 "Re: handling a strip size that's too big", by Dan McCoy

Is there a way to make the TIFF 3.0 (or TIFF 3.3 beta 002) library read scanline-sized amounts of data instead of strip-size amounts of data?

The reason I ask is that our scanner produces 40MB TIFF files consisting of a single strip. I would like to read the image a scanline (a few KB) at a time. However, since the file consists of just 1 strip, when I call TIFFReadScanline, the TIFF library apparently creates an internal buffer for the entire 40MB strip, which is causing a performance problem.

The library is not currently set up read smaller than a strip.

Does the scanner produce compressed or uncompressed files? For uncompressed files, there is a workaround.

If you define "STRIPCHOP_SUPPORT" the library (3.3 beta) will fudge files with a single uncompressed strip to make them look like they are composed of smaller strips within the TIFF spec recommendations. Look in tiffconf.h to define it. Look in tif_dirread.c for the code.

For compressed data, it can't seek around inside the strips. So reading compressed data in smaller chunks would take a structural change to the library.

I hope that helps.

Dan McCoy       Pixar           mccoy@pixar.com