I want to make canvas and user will draw some picture in that which I want to save as Image. I am using Python 3.3.2. It doesn\'t support PIL or Image module. Can someone gu
Maybe it's a bit too late to answer this question. But, I'll still go ahead.
from tkinter import *
import pyscreenshot as ImageGrab
r=Tk()
canvas = Canvas(r,height=1000,width=2000,bg="snow")
def getter():
x2=r.winfo_rootx()+canvas.winfo_x()
y2=r.winfo_rooty()+canvas.winfo_y()
x1=x2+canvas.winfo_width()
y1=y2+canvas.winfo_height()
print("save")
ImageGrab.grab().crop((x2,y2,x1,y1)).save("./test.jpg")
b1=Button(r,text="Save",command=lambda:getter())
b1.grid()
Let me know if this doesn't work. Hope it helps..