Problem to set different delay for animation gif

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
lavige777

Problem to set different delay for animation gif

Post by lavige777 »

Hello,
I need to create animation gif and delays between frames are different.
I try
convert -delay 100 1.gif -delay 1000 2.gif -delay 2000 3.gif anim.gif
But as I can see delay for 1-st frame is the same as for 2-nd = 1000, but for other frames all work properly.
What is the problem with delay for 1-st frame?
And how can I set delay for 1-st frame?
Thanks, Vitaly
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Problem to set different delay for animation gif

Post by anthony »

You may have a old broken version of IM. I reported such a problem in the earily versions of IM v6. It was fixed quite quickly when found.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
lavige777

Re: Problem to set different delay for animation gif

Post by lavige777 »

anthony wrote:You may have a old broken version of IM. I reported such a problem in the earily versions of IM v6. It was fixed quite quickly when found.
Thanks Anthony, I will update ImageMagick and check it out ;)
Lithium

Re: Problem to set different delay for animation gif

Post by Lithium »

I wanted to say that this problem still persisted but would decide to check it with the latest version of ImageMagick (6.4.1).

Code: Select all

imconvert ( rose: -set delay 100 ) ( rose: -negate -set delay 10 ) ( rose: -flip -set delay 100 ) rose.gif
By viewing the gif file with ACDSee 9, I found that two first frame have equal short duration, i.e. problem seems to remain. But then, IE, Firefox and XnView showed the result close to expected.

So, is the problem in the viewer, not ImageMagick? ACDSee have always experiencing problems with animated gifs...
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Problem to set different delay for animation gif

Post by anthony »

I checked with the latest beta version, and it comes out correct in the GIF file.
Only the center image has a delay of 10 centi-seconds.

Check using identify with a %T format escape...
Or use the gif2anim script in IM Examples script area
http://imagemagick.org/Usage/scripts/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply