[Image-SIG] Bug in transform function

Matt Brown matthew.sc.brown at gmail.com
Fri Aug 2 04:56:55 CEST 2013


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.




More information about the Image-SIG mailing list