Page 1 of 1
identify: missing 'resolution' for GIFs
Posted: 2012-12-17T01:27:31-07:00
by thischwa
Hi @all,
I've got 2 installations of imagemagick:
1) OS X 10.7.5 via macports: ImageMagick 6.8.0-7 Q16
2) Ubuntu 12.04 LTS: ImageMagick 6.6.9-7 Q16
I've tested 'identify' with different gif files. At 1) I never get the resolution. 2) works as expected.
I'm sure that 1) was working as expected too, about one year ago (before updating). Something is happened between these version.
This applies for gif files only! Other formats works as expected.
Can someone reproduce this?
Is this a bug?
Kind regards,
Thilo
Re: identify: missing 'resolution' for GIFs
Posted: 2012-12-17T10:42:07-07:00
by fmw42
IM 6.8.0.10 Q16 Mac OSX Snow Leopard
identify logo.gif
logo.gif GIF 640x480 640x480+0+0 8-bit sRGB 256c 31.7KB 0.000u 0:00.000
If you mean dpi, the I do not think it was ever in that information. But you can create your own identify script with whatever string formats you would like. I have several custom identify-like scripts that I use often.
Re: identify: missing 'resolution' for GIFs
Posted: 2012-12-18T00:56:41-07:00
by thischwa
fmw42 wrote:
If you mean dpi, the I do not think it was ever in that information. But you can create your own identify script with whatever string formats you would like. I have several custom identify-like scripts that I use often.
The dpi was in that information definitely! At
http://www.imagemagick.org/script/identify.php you will find it named 'Resolution'.
And I try it with string formats. But the same problem ...
E.g. identify -format "%G;%[resolution.x]x%[resolution.y];%m" JII_120x65-72x72.gif
120x65;0x0;GIF
Re: identify: missing 'resolution' for GIFs
Posted: 2012-12-18T05:08:57-07:00
by thischwa
I've just installed it from source (version 6.8.0-10) on my OS X 10.7.5. 'resolution' is also missing for GIFs.
My test:
$ convert logo: logo.gif
$ identify -format "%[resolution.x]x%[resolution.y]" logo.gif
Output: 0x0
Regards
Thilo
Re: identify: missing 'resolution' for GIFs
Posted: 2012-12-18T10:34:51-07:00
by glennrp
Older versions of "identify" would report ImageMagick's default resolution (72x72), but
did not actually write it in the output GIF. The change apparently happened
in version 6.7.9-0. There's nothing in the ChangeLog about it.
Re: identify: missing 'resolution' for GIFs
Posted: 2012-12-18T11:25:45-07:00
by fmw42
try %x and %y
identify -format "%x by %y" image.gif
see
http://www.imagemagick.org/script/escape.php
Well this shows:
identify -format "%x by %y" logo.gif
0 Undefined by 0 Undefined
So I guess Glenn is right. If it is not defined it will show as zero. That was reported earlier also for tiff
see
viewtopic.php?f=3&t=22457
Re: identify: missing 'resolution' for GIFs
Posted: 2012-12-18T12:07:13-07:00
by glennrp
glennrp wrote:
... The change apparently happened in version 6.7.9-0. There's nothing in the ChangeLog about it.
Fixed the ChangeLog entry for 6.7.9-0 in Svn revision 10301.
Re: identify: missing 'resolution' for GIFs
Posted: 2012-12-18T12:21:29-07:00
by fmw42
according to magick in the tiff post
"A resolution of 0 means the resolution is not defined. This is a result of a bug fix where a user needed to be able to distinguish between an image whose resolution is defined @ 72DPI and those whose resolution is not defined."