Page 1 of 1

Animated GIF with zoom effect

Posted: 2017-04-29T07:53:46-07:00
by soyxan
I am planning to do a simple zoom effect with a picture and save it as an animated GIF.

This is my command:

Code: Select all

magick rose: -duplicate 100 -resize %[fx:10+t]% -set delay 15 -loop 0 rose.gif
But I get a gif with no animation, just showing the first frame (resize 10%).

The strange thing is that if I run the following command, I get 100 JPG with the zoom effect:

Code: Select all

magick rose: -duplicate 100 -resize %[fx:10+t]% rose.jpg
I am using ImageMagick-7.0.5-Q16 on Windows.

Re: Animated GIF with zoom effect

Posted: 2017-04-29T08:14:44-07:00
by snibgo
soyxan wrote:But I get a gif with no animation, just showing the first frame (resize 10%).
Are you sure? For me, the result has animation. But most GIF viewers will crop all frames to the size of the first frame, which is 7x5 pixels. You want all the frames the same size.

There are many ways to do this. For animations, I prefer "-distort SRT".

Code: Select all

magick rose: -duplicate 100 -virtual-pixel None -distort SRT %[fx:(10+t)/100],0 -set delay 15 -loop 0 rose.gif

Re: Animated GIF with zoom effect

Posted: 2017-04-29T09:31:23-07:00
by soyxan
Maybe the problem was Internet Explorer as a viewer. In any case your suggestion (SRT) worked like a charm!
Thanks a lot!