0

I try to display an image in a tkinter canvas

the oval shows up, the rectangle too

but not the image

cwd=os.getcwd()
canvas.TKCanvas.create_oval(50, 50, 100, 100)   
canvas.TKCanvas.create_rectangle(0,0,20,20)
filename=r""+cwd+"/icons.png"
img = tk.PhotoImage(file=filename)
canvas.TKCanvas.create_image((5,5), image=img, anchor='nw')

I checked the file path... "icons.png" is there (it used to give errors until I fixed the path)

thanks for helping me on this

user7082181
  • 354
  • 3
  • 15

0 Answers0