I've got 64 images of 96x192 pixels. I have to arrange them on a rectangle. I need the height and width of that rectangle to be powers of two. Given the dimensions of my images, they don't perfectly 'fit' on it (I can not rotate or cut the images into smaller ones); there is always some 'wasted space'.
- ¿What are the dimensions of the rectangle that minimizes that wasted space?
- ¿Can this problem be generalized to
- ¿Does this problem have a name?
Context: This is not a class exercise. I'm trying to arrange sprites into a image for using them on hobby videogames. The requirement of power-of-two comes from the fact that some old video-cards don't handle non-po2 images very well. I've been thinking about this for 24 hours and couldn't arrive to any satisfying solution.