How to save clipboard data as bmp file

gopal mishra gopalm at infotechsw.com
Tue Apr 21 03:05:53 EDT 2009


I have used ImageGrab.grabclipboard() to get the clipboard image data, it
returns None. This function only supports if the clipboard data format is
CF_BITMAP.

Is there any way to save clipboard data format CF_ENHMETAFILE to bitmap file
using win32 programming.

--
Gopal

> I am trying to save my clipboard data (format is CF_ENHMETAFILE) as BitMap
> file (.BMP).

Have a look at PIL's ImageGrab module:

  http://www.pythonware.com/library/pil/handbook/imagegrab.htm

I'm not sure if the current version supports metafiles, but
it's easy enough to try.

TJG





More information about the Python-list mailing list