I have displayed image on tkinter
canvas. Then I can draw on it using code.
def get_x_and_y(event):
global lasx, lasy
lasx, lasy = event.x, event.y
def draw_smth(event):
global lasx, lasy
canvas.create_line((lasx, lasy, event.x, event.y),
fill='red',
width=2)
lasx, lasy = event.x, event.y
canvas.bind("<Button-1>", get_x_and_y)
canvas.bind("<B1-Motion>", draw_smth)
There are images and drawings on canvas, but how to merge them together?
I am trying to save the altered image as usual.
img.save(path,quality=100)
But it doesn't work as obviously something is missing.
Please help