[PyQt] QPixmap / QImage from numpy or string

Michael Held michael.held at bc.biol.ethz.ch
Sun Jun 28 09:34:21 BST 2009


hi,

I am trying to create a QImage from a numpy array directly. this is not
supported yet, right?
has anybody tried to load a numpy array via a string into a QImage, like

a = numpy.zeros((100,50))
image = QImage(a.tostring(), a.shape[0], a.shape.[1], a.shape[0],
OImage.Format_Mono)

thanks a lot!
michael



More information about the PyQt mailing list