[PyKDE] Help:Anybody give me an example how to use sip.voidptr object?

Shunming Fang fang at blake.3dem.bioch.bcm.tmc.edu
Wed Oct 1 18:55:01 BST 2003


Phil, I checked PIL, there, there is a method fromstring(mode, data)
geting data from string, but when I used it( pass the voidptr), it said it
is invalid type. I think the data type is not memeory address, maybe
string. So there is no example code to show how to use voidptr object?
even I write a c++ extention, I still need know howto.
Thanks

On Wed, 1 Oct 2003, Phil Thompson 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().
> 
> Phil
> 
> 




More information about the PyQt mailing list