-
create a file in
/usr/local/bincalled "stupid" and add the content for "stupid" in this gist to the file. Alternatively you could do a wget. -
Set the file to executable by
chmod +x stupid
Now, the stupid command shoud be available anywhere.
- Imagemagick
- Optipng
Navigate to a directory where you have your image-files located.
Now, you could run stupid and your files would be generated to 2x9 sprites.
| Options | default | description |
|---|---|---|
| -t | 2x9 | Sprite grid to be generated |
| -o | 5 | Optimization lavel [0-9] |
| -d | . | Image location |
| -n | sprite | Sprite name, numbers will be appended |
| -out | . | Output directory |
No options are required.
stupid -t 2x7 -o 5 -d images/ -n sprite -out sprites/