l have an problem with Tkinter
as l would like to add an image as background of frame ,however ,l tried many things but nothing show up. l m at the beginning of my
The problem is that your filename isn't being treated as the filename of the image. The first non-keyword argument is used as the internal name of the image.
You must specify the file
keyword argument for it to use the file as the image:
img=PhotoImage(file="mat.png")
Also, depending on what version you have installed, tkinter may not support png files. If your system does not, with the above change you'll get at error like TclError: couldn't recognize image data
. If that is the case, you'll need to convert your image to GIF.