Merges multiple .PNG files to aid in the creation of spritesheets.
This script was used heavily in the creation of the art assets for Search For The Red Herring, and I found it to be a huge timesaver. As such, I’ve cleaned it up a bit and released it under the GPL for everyone to use.
The script will take in any number of .PNG files as commandline arguments and will then generate an out.png file, while retaining all alpha data!
New in version 0.3 is the ability to merge images vertically as well as horizontally. Simply pass in the
--vert commandline parameter. Also, there is a full example batch file included that will show you some ways to use this script to save even more time.
An example of how it works
Suppose you have 3 individual frames, and you want to combine them into one spritesheet. Here are the frames:
one.png two.png three.png
Then by using merge.py in the following way, you’ll end up with this result:
merge.py one.png two.png three.png out.png
Version 0.3 (Oct 22, 2008) – merge-v0.3.zip
Version 0.2 (Oct 23, 2006) – merge-v0.2.zip