I've created an image with PIL, and I'm trying to get it show on a Tkinter GUI, but I get a blank window. Any ideas?
import Tkinter
import Image, ImageTk, ImageDraw
#create an image
image = Image.new('RGBA', (100, 100))
i = 0
draw = ImageDraw.Draw(image)
## draw some lines
for i in range(1,10):
draw.line((0,i * 10) + image.size, fill=128)
##############
def button_click_exit_mainloop (event):
event.widget.quit() # this will cause mainloop to unblock.
root = Tkinter.Tk()
root.bind("<Button>", button_click_exit_mainloop)
root.geometry('100x100')
#load the image we created before
tkpi = ImageTk.PhotoImage(image)
label_image = Tkinter.Label(root, image=tkpi)
label_image.place(x=0,y=0,width=150,height=150)
label_image.pack()
input()