[PyKDE] Help:Anybody give me an example how to use sip.voidptr
gvermeul at grenoble.cnrs.fr
Wed Oct 1 11:18:01 BST 2003
On Wed, 1 Oct 2003 09:58:06 +0100
Phil Thompson <phil at riverbankcomputing.co.uk> wrote:
> On Wednesday 01 October 2003 8:16 am, Gerard Vermeulen wrote:
> > On Tue, 30 Sep 2003 21:26:39 -0500
> > sfang <sfang at bcm.tmc.edu> wrote:
> > > Hello, Guys,
> > > I got a sip.voidptr through qt.QImage.bits(), and I read doc that
> > > sip.voidptr object is only useful if passed to another Python module. I
> > > try to pass to other python module like PIL to get those pixel data and
> > > fail, Anyone has the experienc of use sip.voidptr? Could you tell me how
> > > to use it or a piece code to show me how to use that kind of object, I am
> > > realy need such a hint. I try a lot of way to understand how to use it.
> > > Thank you very much!
> > > Fang
> > This is bound to fail: PIL does not know anything about qt.QImage.bits()
> If PIL can accept a memory address then you would be able to use the result of
> int() applied to the result of bits().
True, but as far as I remember PIL's image objects are high level with
meta-data information. I have done conversions by reading/writing to
a (memory?) file.
More information about the PyQt