animations - Convert command doesn't respect order - Ask Ubuntu
i've got number of png files, named 1.png, 2.png, etc. , need make animation them. i'm using convert -delay 20 *.png animation.gif.
the first time used it, happened animation created started @ 10 11 12, way 19 , goes 2! it's logical, don't want that. did modify names 01.png, 02.png.
that ok @ beginning. now, want make gif more images(thousands), , problem when goes 10 example, goes 100! can't modifying names manually, because part of script, , user chooses how many png wants. so, how solve?
this nothing convert command - shell expanding glob pattern *.png before passed command, , in lexical collation order lc_collate defined part of system's current locale.
unfortunately it's hard numeric ordering in bash shell (which assume using): if don't mind switching zsh there possibility use numeric glob qualifier i.e.
convert -delay 20 *.png(n) animation.gif for further discussion, see example related q&a glob numerical order
Comments
Post a Comment