[PyKDE] pyqt development snapshot built on windows
Gerard Vermeulen
gvermeul at grenoble.cnrs.fr
Tue May 27 09:22:01 BST 2003
On Mon, 26 May 2003 21:58:59 +0000
"Maxwell Sayles" <maxwellsayles at hotmail.com> wrote:
> ok.. fair enough... I'm using PyQt entirely for research purposes. If the
> project develops enough interest and we stay with PyQt, we will purchase a
> commercial version, but for now we won't be distributing the application.
>
> in any event, i'm still stuck. ultimately i want to manipulate the pixels
> in a QImage from a python C extension under windows. calling bits() and
> passing the result to the extension would work, except that I'm so far
> unable to build a version of PyQt under windows that supports the method
> bits() in QImage.
>
> is it possible to pass the python instance of a QImage to the extension and
> have the extension convert it to a QImage* that I would be able to invoke
> bits() on from the C extension?
>
Sure.
But there are work arounds.
For instance, I am planning to write an image plot widget that takes
a 2D array of floating point values that are mapped to color values.
A first attempt in pure Python is here:
http://gerard.vermeulen.free.fr/examples/ImagePlotDemo.py.html
but it requires the Numerical Python extensions.
(I plan to do the mapping in C++, eventually, and I want to add
axes and a color scale).
The example is part of a PyQwt snapshot:
http://gerard.vermeulen.free.fr/PyQwt-20030526.tar.gz
but is missing from the exe installer that works with sip/PyQt-nc-3.6
http://gerard.vermeulen.free.fr/PyQwt_Qt230-20030526.win32-py2.2.exe
There are other possibilities, too. Search for PIL (Python Imaging Library)
on the PyKDE mailing list.
Gerard
More information about the PyQt
mailing list