Can you put image in the tkinter library widget?
Can you put image in the tkinter library widget?
The 'hello world' image in tkinter is something like the following code:
import tkinter as tk
root = tk.Tk()
imagem = tk.PhotoImage(file="stack-overflow.png")
w = tk.Label(root, image=imagem)
w.imagem = imagem
w.pack()
root.mainloop()
Result:
P.S.AcompletepathtotheimageinWindowswouldlooksomethinglikethis:
imagem=tk.PhotoImage(file="c:/Users/Public/Pictures/stack-overflow.png")