identify: missing 'resolution' for GIFs

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
thischwa
Posts: 3
Joined: 2012-12-17T00:50:40-07:00
Authentication code: 6789

identify: missing 'resolution' for GIFs

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: identify: missing 'resolution' for GIFs

Post 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.
thischwa
Posts: 3
Joined: 2012-12-17T00:50:40-07:00
Authentication code: 6789

Re: identify: missing 'resolution' for GIFs

Post 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
thischwa
Posts: 3
Joined: 2012-12-17T00:50:40-07:00
Authentication code: 6789

Re: identify: missing 'resolution' for GIFs

Post 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
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: identify: missing 'resolution' for GIFs

Post 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.
Last edited by glennrp on 2012-12-18T11:53:33-07:00, edited 2 times in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: identify: missing 'resolution' for GIFs

Post 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
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: identify: missing 'resolution' for GIFs

Post 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.
Last edited by glennrp on 2012-12-18T12:46:53-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: identify: missing 'resolution' for GIFs

Post 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."
Post Reply