2015-03-04 10:07:48 +00:00
|
|
|
import tkinter
|
|
|
|
from PIL import Image
|
|
|
|
from PIL import ImageTk
|
|
|
|
|
|
|
|
t=tkinter.Tk()
|
|
|
|
|
2015-03-15 06:28:17 +00:00
|
|
|
def png(filename):
|
|
|
|
im = Image.open('images/%s.png' % filename)
|
|
|
|
im = ImageTk.PhotoImage(im)
|
|
|
|
return im
|
|
|
|
|
2015-03-04 10:07:48 +00:00
|
|
|
|
2015-03-15 06:28:17 +00:00
|
|
|
im = png('jarate')
|
2015-03-04 10:07:48 +00:00
|
|
|
l = tkinter.Label(t, text="heyo", image=im)
|
|
|
|
l.im = im
|
|
|
|
l.pack()
|
|
|
|
|
|
|
|
t.mainloop()
|