Usually when I edit an animated .GIF with Adobe ImageReady I'm able to re-save it at the same file size. Sometimes I'll find a gif that increases in file size if I re-save it, even though I have made no changes to the image. So I'm wondering if there's an optimization method I've missed.
Here's an example image: http://i.imgur.com/7Fya9.gif
The file size is 496kb but when I re-save it with ImageReady, the file size doubles to 1M, even though I made no changes to the image.
Is ImageMagick able to re-save that image at the same 496kb file size? Any ideas about why the file size doubles in ImageReady?
Thanks =)
Animated .GIF optimization
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Animated .GIF optimization
The GIF animation contains a form of transparency optimization
http://www.imagemagick.org/Usage/anim_opt/#opt_trans
More than likely this is what ImageReady is removing from the GIF animation
You have a link to ImageReady version? I can then compare to see if any of the colors have changed.
The image could have been optimized better in the first place by using some type of order-dither quantization, such as shown in Video to GIF
http://www.imagemagick.org/Usage/video/
http://www.imagemagick.org/Usage/anim_opt/#opt_trans
More than likely this is what ImageReady is removing from the GIF animation
You have a link to ImageReady version? I can then compare to see if any of the colors have changed.
The image could have been optimized better in the first place by using some type of order-dither quantization, such as shown in Video to GIF
http://www.imagemagick.org/Usage/video/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Animated .GIF optimization
I am not an animation expert. The problem is likely in how your animation is created and optimized when copied. The best I could do in IM with my limited knowledge increases your file size from 500KB to 700KB either with a simple copy or with -layers optimizeframe. Other optimize methods increased it to over 1MB.
You probably should review:
http://www.imagemagick.org/Usage/anim_basics/
http://www.imagemagick.org/Usage/anim_opt/
http://www.imagemagick.org/Usage/anim_mods/
also
http://www.imagemagick.org/Usage/formats/#gif (esp. the non-IM tools for optimizing gifs)
You probably should review:
http://www.imagemagick.org/Usage/anim_basics/
http://www.imagemagick.org/Usage/anim_opt/
http://www.imagemagick.org/Usage/anim_mods/
also
http://www.imagemagick.org/Usage/formats/#gif (esp. the non-IM tools for optimizing gifs)
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Animated .GIF optimization
If IM just reads the image, in and out (no optimization change) the image is about 50% larger.
original is 508675 bytes
It looks like what ever did the transparency optimization had extremely strong integration with the LWZ compression algorithm, so as to generate highly compressed image data.
More than likely it was optimized by some unknown, highly specialised video to GIF generator. For this level of optimization the original image is probably a must.
See Lossy LZW Optimization immediately below the link to Transparency Optimization.
PS I tried this on the gifsicle LWZ optimizer too, and it was worse that IM transparency optimization.
Code: Select all
convert 7Fya9.gif gif:- | wc -c
716022
It looks like what ever did the transparency optimization had extremely strong integration with the LWZ compression algorithm, so as to generate highly compressed image data.
More than likely it was optimized by some unknown, highly specialised video to GIF generator. For this level of optimization the original image is probably a must.
See Lossy LZW Optimization immediately below the link to Transparency Optimization.
PS I tried this on the gifsicle LWZ optimizer too, and it was worse that IM transparency optimization.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/