I want to resize such an animated GIF file do.gif enter image description here

If I do convert do.gif -resize 24x24\! do-24.gif I get it resized in do-24.gif but not animated enter image description here

How to resize it right way to get the same animation?

up vote 51 down vote accepted

first run:

convert do.gif -coalesce temporary.gif

then

convert -size <original size> temporary.gif -resize 24x24 smaller.gif
  • 1
    -coalesce "creates a complete view of the animation at each point, a bit like a true film strip, rather than an animation sequence. Such a sequence, known as a Coalesced Animation is much easier to study, edit, modify and re-optimize." – sam Aug 12 '13 at 19:26
  • 27
    gifsicle --resize 24x24 > do-24.gif can to this too – sam Aug 14 '13 at 2:20
  • 2
    Note that the coalesced view is much larger than the optimized one (3.2 times in my test), and the resizing produces a coalesced image, which can also be larger than the original in file size (2.3 times in my test) even if the resolution is smaller. When I try resizing directly it looks fine and has a small file size, though maybe it just works for this image. – endolith Dec 27 '14 at 21:49
  • 1
    gifsicle produced a much better, optimized output for my use case. Thanks @sam! – sj26 Jul 15 '16 at 8:43
  • 4
    convert temporary.gif -resize 24x24 smaller.gif works for me.,without specifying input size. – AMB Aug 21 '16 at 17:24

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.