Use integer arithmetic and fraction reduction to determine the resizing ratio.
Merge pull request #1 from Nebuleon/master

Use integer arithmetic and fraction reduction to determine the resizing ratio