identify: missing 'resolution' for GIFs

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

identify: missing 'resolution' for GIFs

Post by Carter J »

Hi,

"identify -verbose" on GIF's not displaying Resolution of Image

Imagemagick version:
Version: ImageMagick 6.8.8-9 Q16 x64 2014-03-16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP

Operating System:
Windows 7

Image URL:
http://imgur.com/Ow9puVA

Any Insight?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: identify: missing 'resolution' for GIFs

Post by dlemstra »

Are you talking about the DPI of the gif or about the size of the image? A gif image does not have a DPI.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Missing 'resolution' for GIFs and how to change Res of GIF f

Post by Carter J »

Hi,

We are trying to convert JPEG (and other format) files to GIF and resolution change is not working as expected.

Command tried:
convert -resample 216 InputJPG.jpg GifResolution.gif


Link for inputJPG.jpg:
https://www.dropbox.com/s/fz1rzzucgcwn1n9/InputJPG.jpg

And we are able to see "Resolution" entry on issuing "identify -verbose" for some files only.

For below file we are able to see the Resolution
https://www.dropbox.com/s/c6xlmajjotf04 ... lution.gif

For below file we are unable to see the Resolution entry:
http://imgur.com/Ow9puVA

What's make the difference for above two GIF files?

How to change the resolution of GIF Files?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: identify: missing 'resolution' for GIFs

Post by dlemstra »

The DPI is read from the 8bim profile. The Koala image does not contain an 8bim profile.

We recently added a feature that will update the profile if it contains DPI information. It will not add a new 8bim profile, it will only modify the value. With the following command you can change the DPI of GifResolution.gif

Code: Select all

convert GifResolution.gif -density 72 GifResolution.72.gif
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Carter J
Posts: 116
Joined: 2013-12-19T02:20:09-07:00
Authentication code: 6789

Re: identify: missing 'resolution' for GIFs

Post by Carter J »

dlemstra wrote:The DPI is read from the 8bim profile. The Koala image does not contain an 8bim profile.

We recently added a feature that will update the profile if it contains DPI information. It will not add a new 8bim profile, it will only modify the value. With the following command you can change the DPI of GifResolution.gif

Code: Select all

convert GifResolution.gif -density 72 GifResolution.72.gif
Hi,

I tried below command

convert GifResolution.gif -density 150 GifResolution.150.gif

On identify verbose the resolution showing as 150 correctly, but when we try to read the resolution of image using some other tool or when opened the image in Photoshop the resolution still showing as 72.

Identify -verbose GifResolution.150.gif

Format: GIF (CompuServe graphics interchange format)
Mime type: image/gif
Class: PseudoClass
Geometry: 2700x4050+0+0
Resolution: 150x150
Print size: 18x27
Units: PixelsPerInch
Type: Palette
Endianess: Undefined
Colorspace: sRGB

Any help?
Post Reply