[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] Python C extension to manipulate QImage
From: Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date: 2003-05-23 19:04:08
[Download RAW message or body]
On Friday 23 May 2003 7:42 pm, Maxwell Sayles wrote:
> Hi,
> In C, I can load an image using QImage and then access its bits using
> img.bits(). the bits() method is not, however, supported in PyQt. Is
> there a way I can either get the QImage pointer in my C extension? or get
> access to the value returned by bits() in python, which I can then pass on
> to my C extension?
I could implement bits() (and scanLine(), jumpTable() and colorTable()) to
return void*. You then have the choice of passing the Python object to your
extension and calling sipConvertToVoidPtr() to extract the address, or using
the Python int() on the object to convert it to an integer before passing to
your extension.
Phil
_______________________________________________
PyKDE mailing list PyKDE@mats.gmd.de
http://mats.gmd.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