Mobile app version of vmapp.org
Login or Join
Dunderdale640

: Animate images in correct order using ImageMagick I'm using ImageMagick on Ubuntu Linux and I'm attempting to convert sequentially named files into a gif animation. Usually this is an easy operation

@Dunderdale640

Posted in: #Animation #Imagemagick #Linux

I'm using ImageMagick on Ubuntu Linux and I'm attempting to convert sequentially named files into a gif animation. Usually this is an easy operation and only requires that I run something like convert input-*.png output.gif. However, the filenames don't have leading zeros and so the animation order is something like input-0.png input-10.png input-11.png input-12.png etc. See image below:



I'm aware that I should have used the file padding operator (e.g. intput-03%d.jpg) when creating the files. I'm also aware of variety of methods for adding leading zeros to the files. However, at this time renaming the files would not be feasible.

Is there a way to convert those files using the command line on Linux into a gif with the files animated in the correct order?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Dunderdale640

1 Comments

Sorted by latest first Latest Oldest Best

 

@Chiappetta793

This answer from the ImageMagick forum solved the problem of combining files into an animation

convert 'image-%d.png[0-20]' output.gif

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme