[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] Using PIL in PyQT
From: "Diez B. Roggisch" <deets () web ! de>
Date: 2005-11-26 14:55:12
Message-ID: 43887750.2050607 () web ! de
[Download RAW message or body]
Rajeev Joseph Sebastian wrote:
> Hello all,
>
> Is it possible to load images using PIL and draw them on screen using PyQt ?
> Does anyone have any code snippet that could make this possible ?
Certainly. Qt supports some powerful formats, e.g. PNG. So open a image
with PIL, and serialize it to memory using cStringIO as a PNG. The load
it as QImage from there, providing the data as binary string by the
means of a QByteArray. Module struct or ctypes might come in handy here.
Other data formats may be even better - try whatever suits you best.
However I don't have code - but I guess you get the gist.
Diez
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic