Page 1 of 1

Re: Command-Line Arguments Too Long

Posted: 2009-04-15T17:11:21-07:00
by fmw42
use script with a while loop or something like that to build up your animation

something like:

convert image_0.png tmp.gif
i=1
while [ $i -lt 100 ]; do
convert tmp.gif -delay 1000 image_$i.png tmp.gif
i=`expr $i + 1`
done
convert tmp.gif -loop 0 image_animation.gif


This may not be the best solution, but seems to work for me.

I am not sure how you handle the leading zeros. But you can try with %03d. see viewtopic.php?f=1&t=13524&hilit=image+numbers

Re: Command-Line Arguments Too Long

Posted: 2009-04-15T20:19:11-07:00
by anthony
fmw42 wrote:use script with a while loop or something like that to build up your animation
You can also convert that loop into a pipeline using the MIFF file format in the pipe.
By doing this you can avoid the need for the intermediate save files.

Code: Select all

i=0
while [ $i -lt 100 ]; do
  echo >&2 "processing image $i"
  convert tmp.gif -delay 1000 image_$i.png miff:-
  i=`expr $i + 1`
done | convert miff:- -loop 0 image_animation.gif
the other advantage is that you can do the caclulations while processing each image, allowing for better process reporting.