I noticed that the transform function appears to shift images by a half pixel. I ran an image through the identity transformation and it appears to shift by a half pixel.

import numpy as np

from PIL import Image


P = np.array([[1,0,0],[0,1,0]])
I2 = I.transform((100,100),Image.AFFINE, P, resample=Image.BICUBIC)

When I use P = np.array([[1,0,0.5],[0,1,0.5]]), then they are identical.


_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to