I am trying to resize an image by half and show it. Here is the code:
from PIL import Image
image0 = Image.open("cwu_logo0.jpg")
image0Width = image0.width
image0Height = image0.height
print(image0Width)
print(image0Height)
image0Resized = image0.resize(image0Width/2, image0Height/2)
image0Resized.show()
An error occurs when I run this code, I have trouble understanding it:
ValueError: Unknown resampling filter (77.0). Use Image.NEAREST (0), Image.LANCZOS (1), Image.BILINEAR (2), Image.BICUBIC (3), Image.BOX (4) or Image.HAMMING (5)
All help is appreciated.