Trying to display a picture from the internet on my GUI window.
So far my code is:
picURL = "https://graph.facebook.com/" + ID + "/picture"
picBytes= urlopen(picURL).read()
picData = io.BytesIO(picBytes)
picPil = Image.open(picData)
picTk = ImageTk.PhotoImage(picPil)
label = Label(image = picTK, bg = "blue").pack()
The problem is all I get is a blue box where the picture should be. How do I fix this?
Using python 3.3 on windows
picDatais okay, i.e. that you actually receive the image? - tobias_kprint (picData)then compared the output with the image in a hex editor and they matched. - user2148781labelbeing renamed fromlabel_9stackoverflow.com/questions/15411330/… - smont