Page 1 of 1

indicating the passage of time in a file.gif

Posted: 2011-10-15T08:41:31-07:00
by Federico P
Hello everybody, :D

I run a simulation of an Astrophysical problem and et the end i've a lot of file.png .
So i decided to create a file.gif with the following command :

Code: Select all

 convert -delay 20 -loop 0 rho.*.png animation.gif 
Now i want to put some object that indicates the passage of time in my gif. Is it possible to do this ??????? :? :? :?

Re: indicating the passage of time in a file.gif

Posted: 2011-10-15T12:57:09-07:00
by Bonzo
Something like a clock or the time from the photo EXIF data?

Re: indicating the passage of time in a file.gif

Posted: 2011-10-15T16:14:59-07:00
by Federico P
something like the bar to the right of this movie:

http://jila.colorado.edu/~pja/images/planet.mpg

or the time to the right, on the top of this gif:

http://www.astro.cf.ac.uk/research/star ... g.disc.gif

Re: indicating the passage of time in a file.gif

Posted: 2011-10-15T16:38:54-07:00
by fmw42
just compute the time using the frame number and the delay, then label your image with that number. You may have to write a loop to do the labeling from the individual (-coalesced) frames knowing how much delay you are using or going to use to regenerate the animation.

see
http://www.imagemagick.org/script/comma ... 3#coalesce
http://www.imagemagick.org/script/escape.php (see %n and %s)
http://www.imagemagick.org/Usage/anim_basics/
http://www.imagemagick.org/Usage/anim_basics/#coalesce
http://www.imagemagick.org/Usage/anim_opt/
http://www.imagemagick.org/Usage/anim_mods/
http://www.imagemagick.org/Usage/text/

This one shows you how to add a label under your frames:
http://www.imagemagick.org/Usage/anim_mods/#label


Try this:
convert -delay 100 rose: rose: rose: rose: -loop 0 rose.gif

convert rose.gif -coalesce \
-gravity South -background white -splice 0x18 \
-annotate 0 'Time %[fx:t*100]' \
-layers Optimize rost_labeled.gif

see
http://www.imagemagick.org/script/fx.php

Re: indicating the passage of time in a file.gif

Posted: 2011-10-16T05:42:45-07:00
by Federico P
Thanks so much for your answer. I used your command and I finally do my work. 8)

Thanks so much, really.