Applying a specific delay to a frame (animate)?

(David) #1

Hello,

Can we apply a specific delay to a frame?

For example, if I want a pause with the first frame, is it possible?

gmic nbf=20 w=400 photo.jpg -resize “$w”,"{h#-1/w#-1*$w}" -repeat “$nbf”,f --tunnel[0] “{$f+1}”,80%,.5,.5,.4,.0 -done -repeat “{$nbf-1}”,f ["{$nbf-1-$f}"] -done -animate 50

tunnel

Thank you !

0 Likes

(G'MIC staff) #2

No, but you can still duplicate the first frame with something like i[0] [0]x5

0 Likes

#3

I am curious what your goal is. When I make GIFs with delays, etc., I often find it easier to use ImageMagick; it has builtin commands and docs with good examples on animation.

Much is possible with G’MIC but you may have to dig a little deeper if a script hasn’t been written yet for what you want to do.

0 Likes

(David) #4

Thank you for your answers.

I would like to send the result to imagemagick in PNG frames (to guarantee a good post gif optimization) but my command does not seem to work:

gmic photo.jpg -repeat 4,f --tunnel[0] {$f+1},80%,.5,.5,.4,0 -done -o png:- | convert - animated.gif

The result contains only the first frame in the “animated.gif” file.

Thank you.

0 Likes

(G'MIC staff) #5

I’m not sure you can output multiple image files on stdout. Have you tried saving your files on /tmp/ for instance ?

0 Likes

(David) #6

Yes David, I’ve do this but i wanted to do in memory.

It works anyway:

gmic … -o output.png && convert output*.png animated.gif

0 Likes