The Texture Atlas Generator is a standalone tool and API for creating texture atlases.