- I am trying to have images in my Tkinter GUI, hence I am using PIL.
- Image.ANTIALAIS is not working. However, Image.BILINEAR works
Here's some sample code:
import tkinter as tk
from PIL import Image, ImageTk
window = tk.Tk()
image = Image.open(r"VC.png")
image = image.resize((20, 20), Image.ANTIALIAS)
tk_image = ImageTk.PhotoImage(image)
image_label = tk.Label(window, image=tk_image)
image_label.pack()
window.mainloop()
Here's the error:
Traceback (most recent call last):
File "<module1>", line 19, in <module>
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
ANTIALIAS
? – Dendrology