Nov-26-2018, 06:06 PM
(Nov-25-2018, 02:36 PM)snippsat Wrote: To make it more flexible so it support .png and .jpg,not all version on Tkinter dos this.
pip install pillow
Also do not use*
,even if many dos use this in GUI programming.
import tkinter as tk from PIL import ImageTk, Image root = tk.Tk() #photo = PhotoImage(file="blue.jpg") #Nama file foto photo = ImageTk.PhotoImage(Image.open("mu_logo.png")) label = tk.Label(root, image=photo) label.pack() root.mainloop()
Thank you, this is the best Answer, :)