| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2008.04.16 15:19 "Re: efficient thumbnailing", by <jcupitt@gmail.com>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
|
|||||||