python - How to Make Tkinter Canvas Transparent -


in program, trying overlay different canvas geometries on top of image. however, problem canvas has color blocks of image. how can make canvas transparent, geometries draw visible? here code in case explanation did not suffice.

#!/usr/bin/python import tkinter tkinter import * pil import image, imagetk  root = tk() root.title("infrared camera interface") root.resizable(width=false, height=false)    class myapp:   def __init__(self, parent):       #set dimensions of window     parent.minsize(width=600, height=600)     parent.maxsize(width=600, height=600)       #prepare image object being loaded stream camera     self.imgname = 'dish.png'     self.img = image.open(self.imgname)     self.img = self.img.resize((560, 450), image.antialias)           #display image onto stream     self.displayimg = imagetk.photoimage(self.img)     self.imglabel = label(root, image=self.displayimg).place(x=0, y= 0)       self.c = tkinter.canvas(root, bg="white", height=560, width=450)      coord = 10, 50, 240, 210     arc = self.c.create_arc(coord, start=0, extent=150, fill="red")      self.c.pack()  myapp = myapp(root) root.mainloop() 

enter image description here

as know can make canvas transparent.

but can draw image directly on canvas: canvas.create_images()


Comments