I'm trying to create a GIF using some frames exported from Scilab. The frames are named anim_1.gif, anim_2.gif... and so on until 100
I'm using this line in the Windows shell to create the GIF :
convert -delay 10 -loop 0 anim_*.gif animation.gif
My problem is that for what I saw ImageMagick is creating the GIF not with the numerical order but with the order 1,10,100,11,12...,2,20,21... and so on
I'm not really familiar with ImageMagick and reading the help pages didn't really help :/
Does anyone see a solution?
Thanks
A default directory listing will show 1, 10, 100, etc. before 2, 20, etc. That's the order ImageMagick will use to read them when using a wildcard list. Renaming the files with leading zeros like anim_001.gif, anim_002.gif, etc. would resolve your issue. Check the Scilab manual to see how you can save the files with leading zeros.
Another possible method, assuming your input files are in order according to creation time, is to do a directory listing by time/date, redirect the output to a text file, then have your "convert" command read the input images from that list. Using a "@" and the file name will tell IM that you're reading the list of input images from a text file. You can try something like this...
dir /o:d /b anim_*.gif > tmp.txt
convert -delay 10 -loop 0 @tmp.txt animation.gif