On Wednesday 27 Jul 2011 10:09:58 Hugo Parente Lima wrote:
On Wednesday 27 July 2011 02:15:35 Gordon L. Kindlmann wrote:
Hello,
I see from
http://doc.qt.nokia.com/latest/qimage.html#QImage-4
that I can create a QImage around an existing ray image data buffer
in
memory, communicated by the "uchar * data" argument, which is what I
want.
However, looking at
http://www.pyside.org/docs/pyside/PySide/QtGui/QImage.html#PySide.QtGui.QIm
age
(which seems to be based on the same documentation) the corresponding
PySide constructor seems to take a "data" argument of type "uchar".
Is this right?
The docs, no, but you can pass a Python buffer object to the QImage
constructor.
Can someone let me know if it possible or not to use PySide to
display
in-memory image data, referenced by a pointer? The image data is
generated by an extension module written in C.
If the value returned by this extension implements the Python buffer
interface
it's possible.
Thanks,
Gordon
Thanks for the info. Just to be certain, you are referring this?
http://docs.python.org/c-api/buffer.html
Do you know of any code examples that demonstrate this being used with
PySide? Googling for 'pyside "buffer interface"' was not so
informative. I'm especially interested in examples that don't depend
on numpy, for simplicity's sake.
Thanks,
Gordon
_______________________________________________
PySide mailing list
[email protected]
http://lists.pyside.org/listinfo/pyside