delay in a GIF animation

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
sam.cable

delay in a GIF animation

Post by sam.cable »

I am trying to create a (presumably) straightforward GIF animation. My command is:

> convert -delay 5 -loop 0 pic*gif pic_anim.gif

The animated GIF is produced, but the delay between frames is too slow and -- here's the problem -- no matter what value I supply to the "delay" flag, the actual delay in the display of the animation remains the same. I have gone from 1 to 100 without any noticeable difference. I have also tried "-set delay" without any luck. Anyone know what to do about this? Thanks!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: delay in a GIF animation

Post by fmw42 »

try

convert -delay 5 pic*gif -loop 0 pic_anim.gif

Note also that your viewer may have a built in minimum delay amount that is larger than your -delay 5.

P.S. What IM version are you using? There were some versions that had trouble with delay and loop
sam.cable

Re: delay in a GIF animation

Post by sam.cable »

Thanks for the suggestion. Didn't make a difference, though. It looks like I am running rev. 6.2.8. Have there been any problems with it? Thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: delay in a GIF animation

Post by fmw42 »

could very well be. that is a very old version. about 236 versions behind. I recommend that you upgrade
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: delay in a GIF animation

Post by anthony »

So this comes back to the original problem...

What program are you using to run the animation? And just how big are the images?

NOTE "display" is not an animator, it is a slide show program with a very LARGE constant delay being added to the normal 'delay' meta-data. You can not have a zero or even a 5 ms delay, just no delay or the delay+2 seconds.

In IM the normal way to display an animation is to use "animate" and not "display". This will obay any and all delay timings as best it can while still drawing each image in sequence.

See Im Examples, basics, Commands, Display
http://www.imagemagick.org/Usage/basics/#display
and animate
http://www.imagemagick.org/Usage/basics/#animate

You may also like to look at my 'rant' about the handling of zero delays by many browsers, (including IM animate).
http://www.imagemagick.org/Usage/anim_basics/#zero
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply