Question

Image to be compressed . filesize : 669kb I have some images in .GIF format which i want to compress. But i am getting the output either same or hardly 2-5% compression.I need higher compression ratio so that the web pages can be loaded fastly. Currently i am using the gifsicle tool but hardly i am finding much difference in size of the generated gif images. I opted this tool from yahoo smush it.

 gifsicle -O3 gifimage1.gif -o new-gifimage1.gif
Was it helpful?

Solution

Gifsicle's --optimize option will only attempt lossless reduction of an image's file size. What you probably have* is an animated gif where each frame contains random dithering, so most of the pixels will change from one frame to the next.

If your original GIF image had used pattern dithering, you would be able to compress it a lot more. But if that's not an option, I suggest you try either reducing the dimensions of the image (e.g., --scale 0.5), or reducing the number of colours in it (e.g., --colors 16).

* (I'm only guessing, since you didn't bother to share your image)

OTHER TIPS

UPDATE:

The giflossy fork has been merged into gifsicle now, so you will be able to use the --lossy flag with gifsicle now (with the latest version), no need to install giflossy separately.


If you want to enable lossy compression which reduces the size considerably, you can use giflossy fork of gifsicle. Once you have installed it you can use the lossey option as below

 gifsicle -O3 --lossy=80 gifimage1.gif -o new-gifimage1.gif

Installation:

You can use below command to tweak your compression options

 gifsicle -O3 --colors=64 --use-col=web --lossy=100 --scale 0.8  gifimage1.gif -o new-gifimage1.gif
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top