Gifsicle: Convert non-gifs to gifs?

Created on 18 Feb 2014  ·  7Comments  ·  Source: kohler/gifsicle

Would it be difficult or worthwhile to allow some non-gifs such as jpg or png as input and convert them to gif first?

So:

gifsicle --delay=10 --loop *.jpg > anim.gif

Most helpful comment

A pity this was closed early as it's a useful suggestion and as mentioned above pre-converting to GIF frames using ImageMagick appears to have its own drawbacks. Assumed gifsicle actually had this feature given all the frame selection options until I found this issue, as was needing to achieve optimized frame to GIF conversion.

All 7 comments

Worthwhile sure; difficult yes; patches are welcome.

According to this page, you can use ImageMagick to convert images and pipe them straight into gifsicle:

convert Img*.png GIF:- | gifsicle --delay=50 --loop --optimize=2 \
                                  --colors=256 --multifile - > out.gif

What I usually do is convert -delay 3 *.png gif:- | gifsicle -O3 [..etc..] > output.gif.

Do these ImageMagick based solutions actually produce good quality results? Converting to individual gif frames and then assembling them sounds like it would cause a significant quality loss; doesn't it?

Converting to individual gif frames and then assembling them sounds like it would cause a significant quality loss; doesn't it?

That's correct. Each frame would be dithered individually, which removes a lot of information a tool such as gifsicle could use for optimizing successive frames. High-quality GIFs from true color sources is probably outside gifsicle's scope.

I see; thanks for the clarification!

A pity this was closed early as it's a useful suggestion and as mentioned above pre-converting to GIF frames using ImageMagick appears to have its own drawbacks. Assumed gifsicle actually had this feature given all the frame selection options until I found this issue, as was needing to achieve optimized frame to GIF conversion.

Was this page helpful?
0 / 5 - 0 ratings