WCK and PIL

Nobody nobody at nowhere.com
Sun Feb 7 05:19:20 CET 2010


On Fri, 05 Feb 2010 21:05:53 -0800, darnzen wrote:

> I've written an app using the wck library (widget construction kit,
> see http://www.effbot.org), in addition to the wckGraph module. What
> I'd like to do, is take the output of one of my windows (happens to be
> a graph), and save it as a *.png or *.gif. I was planning on using the
> PIL for this. I'd like to use the code I have as is, without re-
> writing all the graphic calls to use PIL methods.
> 
> WCK uses its own "pixmap" class for storing images in memory. I can't
> find any documentation or class reference for pixmap and what I find
> in the source is confusing.

A WCK pixmap is a "draw object" whose underlying drawable is a pixmap
(i.e. a Tk pixmap, which is the platform's native "chunk of video memory"
pixmap type) rather than a window.

>From the source code, WCK doesn't appear to offer any way to retrieve the
pixel data (i.e. there's no way to do the opposite of draw.paste()).




More information about the Python-list mailing list