Page 1 of 1
How to display information about each page of a multipage tiff image using Identify
Posted: 2014-12-30T15:00:38-07:00
by ajb4930
I upgraded from ImageMagick-6.8.6 to ImageMagick-6.9.0. Whenever I use identify to print information about a multipage tiff image, only information about the first page is displayed.
For example:
Code: Select all
identify.exe -format Depth-%p:%[depth]\nColors-%p:%k\nPageGeometry-%p:%g\nResolution-%p:%[xresolution]x%[yresolution]\nType-%p:%r\nCurrentPage:%p\nTotalPages:%n\n <<multipageFile.tif>>
Displays the following output:
Depth-0:1
Colors-0:2
PageGeometry-0:2550x3300+0+0
Resolution-0:300x300
Type-0:DirectClass Gray
CurrentPage:0
TotalPages:2
The command was displaying the above information for all pages of the file with the previous version of ImageMagick that I had installed; it is not working with 6.9.0. What do I need to do to get it to display the same information for the second (and remaining) pages?
Any insight would be appreciated. Thanks!
Re: How to display information about each page of a multipage tiff image using Identify
Posted: 2014-12-30T16:02:03-07:00
by fmw42
Try enclosing the arguments in double quotes
identify.exe -format "Depth-%p:%[depth]\nColors-%p:%k\nPageGeometry-%p:%g\nResolution-%p:%[xresolution]x%[yresolution]\nType-%p:%r\nCurrentPage:%p\nTotalPages:%n\n" <<multipageFile.tif>>
Does that help?
Try
identify multipageFile.tif
do you get multiple lines, one for each page. If not, then perhaps your tif is corrupted.
What about?
identify multipageFile.tif[0]
identify multipageFile.tif[1]
...
for each page you expect
Does it show info for each page?
What about
identify -verbose
does it show each page?
If you still have a problem, please upload your tiff file to some place such as dropbox.com and put the URL here, so others can verify.
Re: How to display information about each page of a multipage tiff image using Identify
Posted: 2015-01-14T12:55:02-07:00
by ajb4930
Thank you for your feedback! I ran the command without
and I was able to get the correct information for each page of my multipage tif. My tif is not corrupted. I also tried displaying the format in a different order, but that didn't seem to work either.
I need to return information about each page with one command to be as efficient as possible. I wonder if this could possibly be a bug with version 6.9.0??
Re: How to display information about each page of a multipage tiff image using Identify
Posted: 2015-01-14T16:51:38-07:00
by fmw42
just leave off the page identifier, so rather than
identify multipageFile.tif[0]
identify multipageFile.tif[1]
Just use
identify multipageFile.tif
it will list each page/layer/frame.
Re: How to display information about each page of a multipage tiff image using Identify
Posted: 2015-01-15T10:03:20-07:00
by snibgo
The behaviour for "identify" changed between 6.8.0-0 and 6.8.9-0. The effect of the change is such that if the format string contains %n (the number of images), the rest of the format string is no longer repeated, once per image. I think this new behaviour is a bug.
This new behaviour applies to "identify" but not "convert -ping" (in 6.8.9-0 and 6.9.0-0). This still gives the old behaviour, issuing a format for each image, even when the format string contains "%n".
Examples:
Code: Select all
f:\web\im>c:\im\ImageMagick-6.9.0\identify -ping -format Depth-%p:%[depth]\nColors-%p:%k\nPageGeometry-%p:%g\nResolution-%p:%[xresolution]x%[yresolution]\nType-%p:%r\nCurrentPage-%p:%p\nTotalPages-%p:%n\n x.tiff
Depth-0:8
Colors-0:256
PageGeometry-0:640x480+0+0
Resolution-0:0x0
Type-0:PseudoClass sRGB
CurrentPage-0:0
TotalPages-0:2
Code: Select all
f:\web\im>c:\im\ImageMagick-6.9.0\convert -ping x.tiff -format Depth-%p:%[depth]\nColors-%p:%k\nPageGeometry-%p:%g\nResolution-%p:%[xresolution]x%[yresolution]\nType-%p:%r\nCurrentPage-%p:%p\nTotalPages-%p:%n\n info:
Depth-0:8
Colors-0:221
PageGeometry-0:640x480+0+0
Resolution-0:0x0
Type-0:PseudoClass sRGB
CurrentPage-0:0
TotalPages-0:2
Depth-1:8
Colors-1:236
PageGeometry-1:480x640+0+0
Resolution-1:0x0
Type-1:PseudoClass sRGB
CurrentPage-1:1
TotalPages-1:2
Re: How to display information about each page of a multipage tiff image using Identify
Posted: 2015-01-15T10:08:49-07:00
by ajb4930
THANK YOU SO MUCH snibgo!!!

Re: How to display information about each page of a multipage tiff image using Identify
Posted: 2015-01-15T10:48:05-07:00
by snibgo
I've reported this as a bug:
viewtopic.php?f=3&t=26887