Python PIL glitches when I resize with 'Image.ANTIALIAS' -
if resize image in python using
img=img.resize((w,h), image.antialias)
it gives me left half of image. works fine without antialiasing, ugly. has seen this? here minimal working(?) example works/fails tif i've tried:
import image import numpy np import matplotlib.pyplot plt img=image.open("test.tif") img=img.resize((300,300), image.antialias) imgm=np.asarray(img.getdata()).reshape(img.size[1],img.size[0]) imgm=np.log10(imgm) imgview=plt.imshow(imgm)
edit: repeating this, right side of image different each time, though contains glitched portion of left side of original image.
this seems work ok me pillow using marbles.tif:
from pil import image img=image.open("marbles.tif") img=img.resize((300,300), image.antialias) img.show()
adding:
img.save("test.png")
i get:
Comments
Post a Comment