Page 1 of 1

Add text into animation at specific frame

Posted: 2009-07-06T13:01:19-07:00
by jlressia
Hi all,
I'm newby with ImageMagik. And I am really surprised with the amount of options that has this tool!
I'm trying to add a text to a GIF at specific frame. But I only get add the text from the beginig.

I'm using a simple line based in the following example..
convert base.gif \
-draw "fill tomato circle 250,30 310,30 \
fill limegreen circle 55,75 15,80 \
font Candice font-size 72 decorate UnderLine \
fill dodgerblue stroke navy stroke-width 2 \
translate 10,110 rotate -15 text 0,0 ' Anthony '" \
draw_mvg.gif

base.gif has 9 frames, and I want add the text into the last 4 frames.

Thank you!!

Kabuby

Re: Add text into animation at specific frame

Posted: 2009-07-06T13:08:51-07:00
by fmw42
I am not an expert on this, but I believe that you will need to separate the frames, write to the 4 frames you want and then recombine frames back into your animation. see -coalesce to separate the frames and all of Anthony's pages on animation. Also see image sequences and parenthesis processing

http://www.imagemagick.org/Usage/basics/#image_seq

http://www.imagemagick.org/script/comma ... p#coalesce

http://www.imagemagick.org/Usage/anim_basics/
http://www.imagemagick.org/Usage/anim_opt/
http://www.imagemagick.org/Usage/anim_mods/

Anthony may be able to provide a succinct command line to help you when he gets online.

Re: Add text into animation at specific frame

Posted: 2009-07-06T13:37:05-07:00
by jlressia
Thanks a lot for your reply!!
I will see the links that you sent. I will tell you if I find some solution.

Regards!
Kabuby

Re: Add text into animation at specific frame

Posted: 2009-07-07T19:17:28-07:00
by anthony
The specific link for modifying a single frame in in Animation Modifications
Frame by Frame - modifying one frame at a time
http://www.imagemagick.org/Usage/anim_mods/#frame_mod

Re: Add text into animation at specific frame

Posted: 2009-07-08T04:27:23-07:00
by jlressia
Thanks Anthony!
The example shows exactly that I need to do, but..
I try to run it in Windows..and I can't run it.
I modify the command line like this:

convert sample.gif -coalesce -gravity center -font Verdana -pointsize 24 -fill dodgerblue -stroke navy ^
(-clone 0 -annotate 0 'This') -swap 0 +delete ^
(-clone 1 -annotate 0 'This') -swap 1 +delete ^
-layers OptimizeFrame frame_mod.gif
gif_anim_montage frame_mod.gif frame_mod_frames.gif

And allways I get errors.. I supose, that I'm having troubles with parenthesis, single quotes and double quotes..

Regards!
Kabuby

Re: Add text into animation at specific frame

Posted: 2009-07-08T09:03:23-07:00
by fmw42
I am not a windows programmer but I think you need spaces after ( and before ) to separate them from the commands

Re: Add text into animation at specific frame

Posted: 2009-07-08T19:54:37-07:00
by anthony
That is exactly right. the parenthesis are separate options you must space separate them form other options.

Re: Add text into animation at specific frame

Posted: 2009-07-27T11:54:51-07:00
by jlressia
Yes!! Adding the spaces all works fine!! :D
Thanks a lot!

Kabuby