Take out multiplication to avoid precision errors because it doesn't; add viewportToImageRectangle test