Reputation: 21
I wish to change the resolution of an image before displaying it. when I use this code:
from tkinter import *
from PIL import ImageTk, Image
...
my_image = my_image.resize((128, 128), Image.ANTIALIAS)
I get the message:
AttributeError: 'PhotoImage' object has no attribute 'resize'
What do I do wrong?
Upvotes: 2
Views: 578
Reputation: 66
You can try this:
PIL.Image.open('Your image location').resize(128,128)
Upvotes: 2