root = tk.Tk() def click(): x=button1.winfo_rootx() y=button1.winfo_rooty() image=PIL.ImageGrab.grab((x,y,x+260,y+250)) image.save( 'tmp.jpeg') button1 = tk.Button(root, compound=tk.TOP, width=60, height=50,bg='black', command=click) button1.pack() root.mainloop()
Hi! How can I save only the button area and then open this image file and print this? If you help, I'll be very happy! Thanks and regards... -- http://mail.python.org/mailman/listinfo/python-list