[PyQt] QImage from Python buffer
Jeremy Sanders
jeremy at jeremysanders.net
Sat Feb 23 16:06:43 GMT 2008
Hi -
Would it be possible to add support to create a QImage from a Python buffer
object?
I want to be able to quickly convert numpy arrays to QImages for display.
Currently I have to convert the numpy to a string, then the string to a
QImage.
it would be nice to do
QImage(numpyarray.data, 100, 100, QImage.Format_RGB32)
where numpyarray is a 100x100x4 8 bit array.
Thanks
Jeremy
--
http://www.jeremysanders.net/
More information about the PyQt
mailing list