[Image-SIG] Capturing the Tkinter Canvas to the Windows Clipboard

Fredrik Lundh fredrik at pythonware.com
Fri Jan 5 08:06:32 CET 2007


david.giesen at kodak.com wrote:

> I've searched all over and I can't figure out how to transfer an image of 
> the Tkinter Canvas to the Windows clipboard (or any clipboard, for that 
> matter).  I've use the PIL to capture and display an image of the Canvas, 
> but I can't figure out how to put that image into the clipboard directly. 
> Yes, I can capture it, display it automatically using Windows Paint and 
> use "copy" in that program to put it in the clipboard, but that seems, 
> well, clunky.

PIL can copy from the clipboard, but not to it.  here's the relevant 
issue tracker item:

     http://effbot.python-hosting.com/ticket/23

contributions are welcome!  (a ctypes-based implementation would be good 
start, I think).

</F>



More information about the Image-SIG mailing list