Is it possible to display ImageDraw images in Tkinter Tabs? I'm working on something where I would like to generate some squares or arcs or other things with ImageDraw then display them statically in a GUI created with Tkinter.
It is important to note that I use the tab function (tkk) in Tkinter.
Canvas stuff:
canvas_arcs= Canvas(tab_arcs, width= screen_height*0.3, height= screen_height*0.3,background='#161616')
canvas_arcs.pack(anchor=tk.NE)
def create_arc(x,y,the_arcs_radius,arc_start,arc_end,arc_width,fill_color):
new_image = Image.new('RGB',(int(tab_arcs_width_input.get()), int(tab_arcs_height_input.get())))
draw = ImageDraw.Draw(new_image)
leftUpPoint = (x-the_arcs_radius, y-the_arcs_radius)
rightDownPoint = (x+the_arcs_radius, y+the_arcs_radius)
twoPointList = [leftUpPoint, rightDownPoint]
draw.arc((twoPointList),start=arc_start,end=arc_end,width=arc_width,fill=fill_color)
new_image.save("HERE_COMES_MY_PATH/1.png","png",quality=100)
tkimage= ImageTk.PhotoImage(new_image)
canvas_arcs_picture=Label(tab_arcs,image=tkimage)
canvas_arcs_picture.pack(anchor=tk.NE)
tab_arcs.update_idletasks()
tab_arcs.update()
Basically I defined a function called "create_arc". In this I create some arcs and a new_image with Pillow.
After that I would like to display it on the canvas tab in the upper right corner. Unfortunately, it doesn't work.
Is this even possible?