AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
February 2006

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2006.02.02 14:33 "Fastest method to load tiff files?", by Edward Lam
2006.02.02 15:00 "Re: Fastest method to load tiff files?", by Bernie Pallek
2006.02.02 15:29 "Re: Fastest method to load tiff files?", by Edward Lam
2006.02.02 15:36 "Re: Fastest method to load tiff files?", by Frank Warmerdam

2006.02.02 15:00 "Re: Fastest method to load tiff files?", by Bernie Pallek

The answer depends a little on what kind of TIFFs you'll be reading.  If
black and white, you'll find a nice example here:
 
http://www.ibm.com/developerworks/linux/library/l-libtiff
 
General tips:
- write several versions of your routines, using different strategies/ideas
- profile your code, and see where your bottlenecks are; if your code is
slow, you can improve it -- if they are in libtiff itself, you're done
- always try to pre-compute the final memory requirements so you can
allocate all at once (superfluous memory management can waste time)
- if you know certain things about types of images, and those types of
images will always be used, you can optimize for them, although that would
generally require tuning of the actual library, not the code that uses it
(for instance, if it's a given that the images are always equal to or small
than a certain size, you can allocate one buffer for that (maximum) size,
and keep re-using that buffer, instead of allocating and de-allocating for
each image in a batch -- realize, though, that the gains are likely to be
marginal)
- if you really need that extra little bit of speed, you might be able to
recompile libtiff with tweaked build settings for your target platform
(consider things like byte-alignment, etc)

Editor's note: This mail was not originally archived, and has been reconstructed from quotes.