2004.01.14 22:06 "Re: [Tiff] TIFF Page Count for Perl", by Andrey Kiselev
In the interests of not re-inventing the wheel, does anyone have or know of a Perl utility for counting for the pages in a TIFF file that they are willing to share? Or alternatively a utility which could be called from a Perl script (on a Unix platform) to pass back a page count?
I'm not a Perl fan, so I don't know about ready to use module (BTW, I'm sure there should be something suitable at the CPAN). But you can analize results obtained from the tiffinfo or tiffdump utilities: just calculate the number of directories in the file. Sometimes it may give a wrong results, though, because directory may not contain the actual image data, so you may check the StripOffsets tag as well. Tiffinfo and tiffdump are the part of the libtiff package.
Andrey V. Kiselev
Home phone: +7 812 5274898 ICQ# 26871517