This library can be used to create (not read) images atlases. That is, combine multiple images into one. This is useful in games with many small textures. Having one large texture and addressing sub-rectangles in it is more efficient than having many small textures and swapping between them.
NewFromImage uses the given image as the destination for all calls to Add.
It is assumed to be empty at the beginning so all the available space will be
used for sub-images.
Add finds a position for the given image in the atlas and copies the image
there. It returns the new sub-image. If there is no more space in the atlas,
it returns an error.