[PyKDE] loading a numarray into QPixmap
Solly Brown
sollyb at cse.unsw.edu.au
Tue Nov 2 09:32:52 GMT 2004
Hi people,
Does anyone know how I can convert the data in my 2D numarray into a
QImage or QPixmap format?
(That is, without iterating over all the elements of the array and slowly
reading each element into the QImage pixel by pixel).
If not, it would be a very handy function to incorporate some time. I note
that you can do it in PyQwt.
Thanks for any ideas........ Solly
ps. I know you can via the PIL library format, but is there a more direct
way?
pps. I've tried using the array tostring() method, but QPixmap doesn't
seem to like it when I do a loadFromData using the binary string
More information about the PyQt
mailing list