On 13.03.06 18:33:32, com@heuel.org wrote: > Dear all > > I would like to use the function loadFromData of QImage, specifically > with PIL. But the code > > [...] > imagePIL = Image.open(fileName) # e.g. a PNG file > data = self.imagePIL.tostring() # this should > contain the data > > image = QtGui.QImage() > image.loadFromData(data) > > [...] > > Why doesn't this work? Have you checked what tostring() returns? Here I don't get something that looks like an image (4K of mostly 00) Also I don't think you can convert this easily, it might be easier to write out to a temporary file and read that one back in. Andreas -- You will inherit some money or a small piece of land. _______________________________________________ PyKDE mailing list PyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde