How to concatenate icons into a single image with ImageMagick?
I like this script for automatical sprite/css generation. "Building CSS sprites with Bash & Imagemagick"
article copy in Waybackmashine https://web.archive.org/web/20150529041037/http://jaymz.eu/blog/2010/05/building-css-sprites-with-bash-imagemagick
script copy http://blog.kupriyanov.com/2011/01/solvedbuilding-css-sprites-with-bash.html
You are looking for:
montage -background transparent -geometry +4+4 *.png sprite.gif
From the page you linked, 'montage' is the tool you want. It'll take a bunch of images and concatenate/tile them into a single output. Here's an example image I've made before using the tool:
(source: davr.org)
convert works much better than montage. It arranges images vertically or horizontally and keeps png transparency.
convert *.png -append sprites.png (append vertically)
convert *.png +append sprites.png (append horizontally)