3

I am trying to combine some PNG images to make a GIF animation. To do this I have installed ImageMagic and am trying to execute the command:

convert -delay 10 -loop 0 inputfiles*.png animaion.gif

I have a lot of image files that I am trying to combine so I don't really want to type them all out individually, is there anyway I can execute this command as some sort of loop, or alternatively a better method of creating an animation from these images?

I have written a program to output all the file names so I can just copy and paste them into the terminal, this works but if anyone knows a better way to do this it would be helpful.

Thanks

2
  • I have written a program to output all the file names so i can just copy and paste them into the terminal, this works but if anyone knows a better way to do this it would be helpful. Nov 22, 2013 at 18:29
  • Welcome to AskUbuntu! Please do not add comments to specify things --- you can just edit your question whenever you need.
    – Rmano
    Nov 22, 2013 at 19:15

1 Answer 1

2

If I understand correctly, if you have mypgrogram that outputs the list of filenames, you should be able to simply do

convert -delay 10 -loop 0 $(myprogram) animation.gif

The $(...) operator is a bash shell operation that runs the indicated command and then replaces itself with the output (more or less... the shell is a quite powerful tool).

Not the answer you're looking for? Browse other questions tagged .