Oct-29-2020, 01:48 PM
I believe that elfbot link is old tkinter, accepts png, gif. pgm and basex by default if you want to use jpg files you can use PIL or pillow. PIL docs
Pil has a module for using jpg's that should be included on the initial install.
another common mistake is to save a reference of the PhotoImage. My common practice is to save it in a list, other wise it will get garbage collected and you won't see the image.
Pil has a module for using jpg's that should be included on the initial install.
from PIL.ImageTk import Image, PhotoImagenotice the PIL.ImageTk imports Image and PhotoImage -make sure your tkinter import doesn't have any namespace conflicts
another common mistake is to save a reference of the PhotoImage. My common practice is to save it in a list, other wise it will get garbage collected and you won't see the image.