2007.07.16 12:04 "Re: [Tiff] What perfoms better, TIFFReadScanline or TIFFReadEncodedStrip ?", by Joris
i'm wondering what technique should be used/voided if performance matters. I think reading scanlines is just a wrapper code around reading strips (tiles also?).
So does it make sense to void scanline reading and read/process strips instead?
Libtiff supports strip "chopping" in many cases where large strips are
> split into small scan lines
..into strips with fewer number of scanlines, is likely what you meant...
>, which are read incrementally. This is an
important feature since it reduces resource consumption (memory) for large strips. If the strip is very large, performance is likely to be better when using the scanline interface, as long as strip chopping works. If the strip is reasonably small, then it may be faster to use the strip interface directly.
It should be noted though, that strip chopping only works for uncompressed IFDs. Thus, it is a pretty half-assed solution. Big image handling, should always be based on streaming the image through its subsequent processors, decoders and encoders included, rather then buffering between each step. Every buffer that remains necessary, should be an array of tiles rather then a single huge buffer. The operating systems's swapping can be relied upon for these arrays of tiles, unless you need to deal with really huge images in which case you need your own tile swapping support.
Joris Van Damme
Download your free TIFF tag viewer for windows here: