Use integer arithmetic and fraction reduction to determine the resizing ratio.