Gif Animation. Delay seems to get ignored

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
jimbojones
Posts: 3
Joined: 2012-02-23T13:50:59-07:00
Authentication code: 8675308

Gif Animation. Delay seems to get ignored

Post by jimbojones »

Hi,

I am using the following code to generate an animated gif. The code worked with a previous version of ImageMagick (a version about 2 years old) but the current version does ignore the delay I want to set.

Code: Select all

        convert ( c:/banner.jpg ) -respect-parenthesis ^
        ( -font Arial -fill grey -strokewidth 2 -pointsize 20 -delay 10 -clone 0 -annotate 0x0+15+20 "Frame 1" ) ^
        ( -font Arial -fill black -strokewidth 2 -pointsize 20 -delay 200 -clone 0 -annotate 0x0+15+20 "Frame 1" ) ^
        ( -font Arial -fill grey -strokewidth 2 -pointsize 20 -delay 10 -clone 0 -annotate 0x0+15+20 "Frame 1" ) ^
        ( -delay 300 -clone 0 ) ^
        ( -font Arial -fill grey -strokewidth 2 -pointsize 20 -delay 10 -clone 0 -annotate 0x0+15+20 "Frame 2" ) ^
        ( -font Arial -fill black -strokewidth 2 -pointsize 20 -delay 200 -clone 0 -annotate 0x0+15+20 "Frame 2" ) ^
        ( -font Arial -fill grey -strokewidth 2 -pointsize 20 -delay 10 -clone 0 -annotate 0x0+15+20 "Frame 2" ) ^
        ( -delay 300 -clone 0 ) ^
        -delete 0 -loop 0 -layers optimize c:/banner_animation.gif
Whats going wrong?

Thanks in advance
jim
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Gif Animation. Delay seems to get ignored

Post by fmw42 »

what is your exact version. there were some old releases where -delay had problems. it should work with current versions, though I have not tested your code.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Gif Animation. Delay seems to get ignored

Post by anthony »

-delay is only applied to new images that are read in or created through a 'coder' of some kind.

It is not applied to in-memory or cloned images. Use -set delay for that


Suggestions of how to make this differentiation for the furture IMv7 Shell API is welcome.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
jimbojones
Posts: 3
Joined: 2012-02-23T13:50:59-07:00
Authentication code: 8675308

Re: Gif Animation. Delay seems to get ignored

Post by jimbojones »

anthony wrote:
It is not applied to in-memory or cloned images. Use -set delay for that
works great. thank you!
jimbojones
Posts: 3
Joined: 2012-02-23T13:50:59-07:00
Authentication code: 8675308

Re: Gif Animation. Delay seems to get ignored

Post by jimbojones »

nvm
Post Reply