[SOLVED] How to montage a large number of images in order
Posted: 2015-09-23T12:31:49-07:00
I have 50 PNG images I want to montage into a single spritesheet. They're named img-0.png, img-1.png, ..., img-9.png, img-10.png, ..., img-49.png.
What I want to do is essentially:
This however messes up the order so the result is: img-0.png, img-1.png, img-10.png, img-11.png, ..., img-19.png, img-2.png, img-20.png, ...
Now, I could just add an extra 0 to img-1.png through img-9.png so that I would have img-01.png, img-02.png, ... but this is a bit of a hassle and in this case I would have to do it several times. I've read that it's possible to use a text file containing a list of files, but then I would need to create a correctly ordered list, which would be even more time consuming as far as I know. I've also tried:
but that doesn't seem to work either. It really seems to me that there should be a simple way of doing this when all the files are named in increasing numerical order, even if those leading zeroes aren't there on all the numbers. So, is there one or do I have to set up some renaming script?
(I'm running Imagemagick 6.9.1 under Windows 7.)
What I want to do is essentially:
Code: Select all
montage img-*.png spritesheet.png
Now, I could just add an extra 0 to img-1.png through img-9.png so that I would have img-01.png, img-02.png, ... but this is a bit of a hassle and in this case I would have to do it several times. I've read that it's possible to use a text file containing a list of files, but then I would need to create a correctly ordered list, which would be even more time consuming as far as I know. I've also tried:
Code: Select all
montage img-[0-9].png img-[10-25].png spritesheet.png
(I'm running Imagemagick 6.9.1 under Windows 7.)