I am making an animated GIF file using following command:
convert -delay 10 -loop 0 *.png animated.gif
But, the problem happens in the order of *.png.
My PNG files are like 1.png, 2.png, ... 100.png.
In the resulting animated GIF, the order of frames are like: 1.png, 10. png, 100.png, 2.png ...
I want that in the resultant GIF the snapshot are in order like 1,2,3 ... 100.
Please try sort
:
$ ls | sort -V
1.png
2.png
10.png
100.png
So ultimately:
convert -delay 10 -loop 0 $(ls *.png | sort -V) animated.gif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With