Im geting the error 'PhotoImage instance has no attribute 'resize'' despite multiple online sources stating that this is the way to do resize an image using PIL. Any Ideas?
relevant code:
Deathwing = ImageTk.PhotoImage(Image.open('Deathwing.PNG'))
Deathwing2=Deathwing.resize((100,50),Image.ANTIALIAS)
picture1=Label(pictures_frame,image=Deathwing2)
picture1.grid(column=1,row=1)
and PIL is impoted as:
from PIL import Image,ImageTk
For anyone who has the same problem I fixed it by doing:
deathwing=Image.open('Deathwing.PNG')
image2=deathwing.resize((100,50),Image.ANTIALIAS)
Deathwing2=ImageTk.PhotoImage(image2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With