I am trying to download a jpeg file from a url and display it in a tkinter GUI window
This is the code I'm trying to use to load and display a JPEG:
picURL = "https://graph.facebook.com/" + ID + "/picture" picBytes= urlopen(picURL).read() picData = io.BytesIO(picBytes) picPil = Image.open(picData) picTk = ImageTk.PhotoImage(picPil) label_9 = Label(image = picTK, bg = "blue").pack()
The problem is that the image is not displayed. All I get is a blue box. How can I do this so that the image is displayed?
thanks
Im using python 3.3 for windows
source share