Animated Gif Conversion

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
United36
Posts: 2
Joined: 2014-06-06T05:18:26-07:00
Authentication code: 6789

Animated Gif Conversion

Post by United36 »

I am using ImageMagick to convert a series of screen captures into an animated GIF. The problem I have is that the resolution degrades when the animated GIF is created. Is there anyway to retain the screen capture resolution when converting to the animated gif?

Any help is greatly appreciated!

Thanks!
holden
Posts: 79
Joined: 2013-02-07T08:22:57-07:00
Authentication code: 6789

Re: Animated Gif Conversion

Post by holden »

Is it the resolution, or is it because gifs only support 256 colors as opposed to millions that other formats do, from wikipedia:
"The (gif) format supports up to 8 bits per pixel for each image, allowing a single image to reference its own palette of up to 256 different colors chosen from the 24-bit RGB color space. It also supports animations and allows a separate palette of up to 256 colors for each frame. These palette limitations make the GIF format unsuitable for reproducing color photographs and other images with continuous color, but it is well-suited for simpler images such as graphics or logos with solid areas of color."

I think the crappiness is part of the charm 8)
United36
Posts: 2
Joined: 2014-06-06T05:18:26-07:00
Authentication code: 6789

Re: Animated Gif Conversion

Post by United36 »

Not sure, but is does look like a resolution issue. I am not sure how to check the resolution of an image exactly. I wonder if the image properties would give me the dpi?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Animated Gif Conversion

Post by fmw42 »

I do not believe that gif images support any density parameter. If it does, then using

identify -verbose image.gif

will show Resolution and Units.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Animated Gif Conversion

Post by snibgo »

If resolution changes, you would be able to see it with "identify -verbose". But I don't think GIF stores resolution, so it can't change.

What command "degrades" the GIF?
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Animated Gif Conversion

Post by fmw42 »

How are you creating your animated gif from the source images. What format are the source images? What is your exact command line? What platform and what version of IM? If your source images are 24-bit color, then when converting to gif, they become 8-bit color with 256 or less colors. Also you may see changes from frame to frame if you do not use the same color palette to reduce the colors. See -remap http://www.imagemagick.org/Usage/quantize/#remap.

We really need to know more about your processing and environment to help further.
Post Reply