2009.10.28 09:01 "[Tiff] Number of images in a multi-tiff file?", by Mark Pereira

2009.10.28 17:47 "Re: [Tiff] Number of images in a multi-tiff file?", by Mark Pereira

Thanks Frank for these clarifications!

Mark

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.

Business Disclaimer
____________________________________________________________
This e-mail message and any files transmitted with it are intended solely
for the use of the individual or entity to which they are addressed. It
may contain confidential, proprietary or legally privileged information.
If you are not the intended recipient please be advised that you have
received this message in error and any use is strictly prohibited. Please
immediately delete it and all copies of it from your system, destroy any
hard copies of it and notify the sender by return mail. You must not,
directly or indirectly, use, disclose, distribute, print, or copy any part of
this message if you are not the intended recipient.
___________________________________________________________