Change the size calculation, improving upscaling.

The IPU documentation has an algorithm that makes 4:1 upscaling (for example, 80x60 to 320x240) miss 3 pixels at the right and bottom, so the target size is 317x237. This algorithm makes the resizing be exact according to the fraction.
Merge pull request #8 from Nebuleon/new-calc-size

Change the size calculation, improving upscaling.