2008.04.16 13:26 "[Tiff] efficient thumbnailing", by Dr. Michael J. Chudobiak
2008.04.16 15:19 "Re: [Tiff] efficient thumbnailing", by John
2008/4/16 Dr. Michael J. Chudobiak <mjc@avtechpulse.com>:
Is there an efficient way to generate thumbnails from tiff files?
You don't need to load the whole thing into memory, you can loop over an image a scan-line at a time with TIFFReadScanline(). Something like:
for line in image step shrink-factor:
for y in shrink-factor:
TIFFReadScanline()
horizontal shrink line by shrink-facto
vertical shrink set of horizontally shrunk lines
output line of shrunk image
You still have to read the whole file, of course, but it shouldn't need much memory.
John