I just started using ImageMagick from the command line and I must say, this tool is pretty amazing!
GD library don't give me the flexibility i need for my projects and ImageMagick have a lot to offer.
Moving on, I got a few questions about sprite generation and "conditional rules" that must be applied in order to generate cross browsers compatible CSS sprite based on .png images.
Here's what i'm trying to do :
1/ I got 60+ images in a folder with homogeneous widths and heights (24px X 24px).
2/ I have to increase the canvas size of each images in order to prevent images to be glued to one another (2px of padding).
3/ Due to an Opera bug, the final sprite should never exceed 2042 pixels in width (does "+append" have some sort of callback to check the final image width?)
Do you think that can be done in one command line or should i make a shell script to loop on each images?
Thanks a lot
EDIT
I made some basic test and :
Code: Select all
montage myimages/*.png -tile 78x -geometry 24x24+1+1 sprite.png