SpriteBuncher is a free, open-source texture packing program. It features an easy-to-use graphical interface, and advanced packing algorithms such as MaxRects. Further options include cropping, rotation, extruding, and padding.
Data can be exported to a range of common output formats – e.g. Cocos2d, LibGDX, and Unity – or via generic XML, JSON, and plain text files.
Examples and documentation are included.
Source code available at: https://github.com/bazgt/SpriteBuncher [GPLv3].