unreversed image scaling logic