wx and pil conversion

Diez B. Roggisch deets at nospam.web.de
Thu Mar 13 17:09:26 CET 2008

azrael wrote:

> A little problem.
> Can I directly show Pil objects "image.open("bla.jpg") in Wx or do I
> have to transform them.
> If I have to transofm them How can I do it. Pixel by pixel or is there
> somethin built in in pil or wx or python.
> pilj->wx and wx->pil.

PIL doesn't depend on wx, so if anything then wx knows about PIL. But I
doubt it. Instead, use cStringIO and save a PIL-Image to memory, then use
that as file-argument to something that works for wx - no idea what, but
there should be means to load JPEGs and so forth.

If file-objects aren't enough, create a temp-file. No, that's not to slow.


More information about the Python-list mailing list