Texture Atlas Generator
A texture atlas generator/packer written in one single Java file. Currently it only supports loading and saving of PNG textures, this can easily be extended to other formats supported by Java’s ImageIO class.
Besides the texture atlas, a .txt file is also generated with texture coords for all the textures.
Examples and further details are available at my website
The source code for this application is released into the Public Domain.
AtlasGenerator <name> <width> <height> <directory>
AtlasGenerator atlas 2048 2048 images
This will take all the PNG files in the images directory next to application and pack them into one or more 2048×2048 atlases named “atlas1.png” to “atlasN.png”, where N is the number of atlases generated. More than one atlas is generated if the PNG textures do not fit into one atlas.