Unless someone knows of a more suitable module, you can try counting the IFD's (image file directories) directly. Here's some pseudocode to get you started. Sorry, I dont have time for more right now. You can google the TIFF spec for more info.
read bytes 0,1 # Byte ordering: 4949 = intel, 4D4D = motorola $imagecount = 0 $offset = read bytes 4-7 # first image directory while $offset != 0 $ifdlength = read first 2 bytes at $offset and multiply by 12 $imagecount++ $index = $offset + $ifdlength + 2 $offset = read 4 bytes at $index
Update: math correction
In reply to Re: Multipage TIFFs
by hangon
in thread Multipage TIFFs
by oligmd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |