Page 1 of 1

Gif Animation. Delay seems to get ignored

Posted: 2012-02-23T14:00:52-07:00
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

Re: Gif Animation. Delay seems to get ignored

Posted: 2012-02-23T15:22:44-07:00
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.

Re: Gif Animation. Delay seems to get ignored

Posted: 2012-02-23T18:50:15-07:00
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.

Re: Gif Animation. Delay seems to get ignored

Posted: 2012-02-24T01:30:23-07:00
by jimbojones
anthony wrote:
It is not applied to in-memory or cloned images. Use -set delay for that
works great. thank you!

Re: Gif Animation. Delay seems to get ignored

Posted: 2012-02-24T08:37:07-07:00
by jimbojones
nvm