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
October 2009

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

2009.10.28 09:01 "Number of images in a multi-tiff file?", by Mark Pereira
2009.10.28 10:50 "Re: Number of images in a multi-tiff file?", by Brad Hards
2009.10.28 16:22 "Re: Number of images in a multi-tiff file?", by Frank Warmerdam
2009.10.28 17:47 "Re: Number of images in a multi-tiff file?", by Mark Pereira

2009.10.28 16:22 "Re: Number of images in a multi-tiff file?", by Frank Warmerdam

Brad Hards wrote:
> On Wednesday 28 October 2009 20:01:21 Mark Pereira wrote:
>> Is there a way to know the number of images present in a multi-tiff file
>> in constant time.
> TIFFNumberOfDirectories() ?

Mark,

No, there is not since the directory list needs to be walked to count them.
The count is not available in a header or anything like that.

Skimming the code briefly it appears that TIFFNumberOfDirectories() is careful
to read the minimum amount of information from the file (a few numbers from
the start of each directory) to count through the file so the cost should
be minimal, but not constant time.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent