juj/RectangleBinPack — pull request #2 by stefanbeller (2012-09-08 17:38:30+00:00)
Title: Improve the example program, so it is more convenient to use from external programs.

As I do not want to miss the python additional libraries for image processing, I decided to
write a python script which does my application handling including image processing, but the
packing will be done in a fast external c++ program.

So I adapted the BinPack.cpp example to my needs.
I need the very best results and offline processing is no problem, hence it is used.

My actual goal is to place a given set of rectangles into the smallest rectangle possible.

So there is a spritesheet containing all the animation frames for a game (http://www.flarerpg.org/). The sprites are fixed and I cannot alter them or change the number of used frames.
When the image is loaded into the game, it will be kept as a bitmap, hence no compression is applied, so even the vast majority of transparent pixels counts.
For example see here https://raw.github.com/clintbellanger/flare/master/mods/fantasycore/images/enemies/skeleton.png

Because of no compression applicable while playing the game I need to shrink the image
to the smallest possible area to reduce the memory footprint.