Page 1 of 1

jpg to gif problem

Posted: 2013-04-13T18:12:09-07:00
by phobos
hello!
i have 50 jpg pictures frames from video
5 seconds to 10 frames each
pictures with names
/mydir/i1.jpg
/mydir/i2.jpg
/mydir/i3.jpg
..
/mydir/i50.jpg
i want unite all frames in one animated gif picture
i try use command

Code: Select all

convert   -delay 20   -loop 0   i*.jpg   animatespheres.gif
but the images are combined in the wrong order
something like this
i1
i10
i11
..
i19
i2
i20
i21
..
i49
i5
i50
result Image
i use php and run commands with exec().
how to sort by name picture names before merging into the animated gif? :(

Re: jpg to gif problem

Posted: 2013-04-13T18:26:57-07:00
by fmw42
Name your images i01 ... i50. That is they need the leading zeros to sort properly.

Re: jpg to gif problem

Posted: 2013-04-14T03:54:14-07:00
by phobos
fmw42 wrote:Name your images i01 ... i50. That is they need the leading zeros to sort properly.
yes, with 0 it work nice!
Image
thank you again fmw42! :-P