python - PIL returns empty boxes instead of images -
i'm trying write program in python 3 using pil , having hard time displaying image...
i using dictionaries temporarily store variables config.ini
usernames={} usericons={} in range(numberofusers): usernames[i]=config[str(i)]["username"] usericons[i]=config[str(i)]["usericon"]
later, want display grid images(thumbnails) , usernames user select from
usericonwidgets={} in range(numberofusers): usericons[i]=imagetk.photoimage(image.open(config[str(i)]["usericon"])) usericonwidgets[i]=label(usersselectioncanvas,borderwidth=2,relief=solid,) usericonwidgets[i].configure(image=usericons[i]) usericonwidgets[i].grid(row=i,column=0)
however, keep getting empty square images should be... no errors appear, white boxes... doing wrong , how fix it?
Comments
Post a Comment