Reputation:
How to display an image in Python 3.2 using Tkinter? The PIL doesn't work so something that doesn't use it.
Upvotes: 0
Views: 8023
Reputation: 1
from tkinter import PhotoImage
photo = PhotoImage(file="/home/pi/pile.gif")
lb=tkinter.Label(root,image = photo)
lb.grid(row=4, column=1)
Upvotes: 0
Reputation: 1
it's very simple:
photo = PhotoImage(file="C:\pictures\pic1.gif")
label = Label(image=photo)
label.pack()
Upvotes: 0
Reputation: 385980
Use the Tkinter PhotoImage
class to create an image object, then assign this object to the image
attribute of a Label
widget.
For more information see http://effbot.org/tkinterbook/photoimage.htm
Upvotes: 4