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

marked as duplicate by Ciro Santilli 新疆改造中心 六四事件 法轮功, karel, Eric Carvalho, Fabby, vidarlo Dec 26 '18 at 0:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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. – user2538235 Nov 22 '13 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 '13 at 19:15
1

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 or ask your own question.