Page 1 of 1
identify -format fails
Posted: 2011-03-01T16:48:47-07:00
by Drarakel
It seems, that an "identify -format %A" alone (for checking whether there's an alpha channel) doesn't read the image anymore correctly?
Code: Select all
convert logo: -transparent white logo.png
identify -format "%A" logo.png
False
The above worked in older IM versions, but not with the current version.
However, when combined with other properties, it's ok:
Code: Select all
identify -format "%A\n%r" logo.png
True
DirectClassRGBMatte
(By the way, it should be PseudoClass here, not DirectClass.)
Using ImagMagick v6.6.7-10 Q16, Windows XP.
Re: identify -format fails
Posted: 2011-03-01T17:20:03-07:00
by magick
We can reproduce the problem you posted and have a patch in ImageMagick 6.6.8-0 Beta (available by sometime tomorrow). Thanks.
Re: identify -format fails
Posted: 2011-03-05T17:58:20-07:00
by Drarakel
Works now. Thanks!
Re: identify -format fails
Posted: 2011-03-10T01:07:15-07:00
by Drarakel
Another small thing.. 'identify -format "%x %y"' sometimes fails, too - at least with PNG files. Example - take this file:
http://img651.imageshack.us/img651/5595/rosebc.png
...
Resolution: 456x456
Units: PixelsPerInch
...
Code: Select all
identify -format "%[xresolution]x%[yresolution]" rosebc.png
456x456
But with the next command, only the IM default value gets reported:
Code: Select all
identify -format "%x x %y" rosebc.png
72 Undefined x 72 Undefined
But it works with "+ping":
Code: Select all
identify +ping -format "%x x %y" rosebc.png
456 PixelsPerInch x 456 PixelsPerInch
Or without +ping, but with an additional 'property':
Code: Select all
identify -format "%x x %y\n%[version]" rosebc.png
456 PixelsPerInch x 456 PixelsPerInch
ImageMagick 6.6.8-2 2011-03-06 Q16
http://www.imagemagick.org
Seems that all of the tEXt/zTXt chunks in PNG are affected.
Re: identify -format fails
Posted: 2011-03-11T13:37:27-07:00
by glennrp
Yes, a recent patch involving the PNG text:density chunk inadvertently
suppressed all of the text chunks. Should be OK now in IM-6.6.8-4, SVN r3845.
Re: identify -format fails
Posted: 2011-03-11T18:09:03-07:00
by glennrp
How was the file "rosebc.png" created? It contains a text:density chunk and a text:units chunk,
and is missing some of the chunks usually written by ImageMagick.
Re: identify -format fails
Posted: 2011-03-11T20:04:17-07:00
by Drarakel
I created the chunks manually (with TweakPNG).
Thanks for the new patch!