Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There is no shift, the first output is the expected behavior. After a 8x scaling you get the following pixel center coordinates:

(0,0) -> (0,0)
(0,1) -> (0,8)
(1,1) -> (8,8)
(1,0) -> (8,0)

You can check on the resulting image that they are correct.

But, if you want to get the second image, you have to translate the original coordinates by (0.5,0.5) pixels, exactly as you did.