I'm animating a gif with Imagemagick, I'm doing
animate *.JPG, and that repeats the animation. But I would like it to go do "pic1, pic2, pic3, pic2, pic1" and repeat, so that it goes back and forth. How can that be done, preferably from a cli?
How about this:
Just correcting the code above.
cp pic2.jpg pic4.jpg && animate *.jpg
Otherwise the 1st pic would show twice. I don't know if there is an easier way way to do this.
Even on GIMP we have to add the duplicated images.
You can just create a new GIF (here, animation.gif) from pic*.jpg.
Animating with a delay between frames of 0 and a back-and-forth that repeats for ever can be done with:
convert pic*.jpg -set delay 10 -reverse pic*.jpg -set delay 10 -loop 0 animation.gif
(assuming your jpgs are arranged in alphanumeric order).
obtained from here: http://www.noah.org/wiki/ImageMagick (not my site).
can you try this ?
cp pic1.jpg pic4.jpg cp pic2.jpg pic5.jpg animate *.jpg
just a guess
You should simply do your animation and layer it in order "pic1, pic2, pic3, pic2." In that order to start with. You will achieve the desired results when it repeats. In other words, you're thinking have (for example) 3 frames that go forwards and then backwards. That doesn't work. This will take up more space, but instead you must have four frames that repeat normally.