An image packing command-line utility.
The output file type is inferred from the extension of the output filename.
Currently supported input and output file types are 'png', 'bmp', 'jpg', and 'gif'.
Additionally, a text file containing the packed image information will be saved
along with the packed image in the format 'filename xpos ypos width height',
with each each packed image on a seperate line. For example, the packed image
'sprite.png' will be saved in 'packed.txt' as 'sprite.png 10 10 32 32'.
Note:
'png' and 'bmp' images: An attempt will be made to quantize to an indexed
8-bit image. If more than 256 unique colors exist in the final image it will
be saved as an RGB image instead (including alpha for 'png' images).
'gif' images: An optimized palette will be generated.
Usage:
packer [-g] [-p] outFile inFile1 inFile2 [inFileN...]
packer [-g] [-p] outFile -a
-g
min - Generates minimal bounding rectangle using the specified
rectangle packer. (default when <= 500 images)
minf - Forces fast search. Same as "min" except will attempt to lower
the number of bounds tested at the expense of creating the absolute
minimal bounds that the specified packer can achieve.
(default when > 500 images)
minnof - Force no fast search when more than 500 images.
minpow - Generates a minimal bounding rectangle with power-of-2 dimensions.
sq - Generates a minimal square bounding rectangle.
sqpow - Generates a minimal square bounding rectangle with
power-of-2 dimensions.
-p
s - A simplistic packing algorithm. Works best with many images of the
same dimensions.
bsp - A binary space partitioning packing algorithm that attempts to
minimize wasted space. Works best with images that have
varying dimensions. (default)
-a
A text file with each input image filename on a seperate line.
Example:
packer -gsqpow -ps packed.png -aSprites.txt