[PyKDE] PyQt4 Win QImage save problem
Christophe Chailloleau-Leclerc
zekrap at gmail.com
Sat Jun 10 09:43:31 BST 2006
Hello,
I'm trying to use Qt's imaging capabilities through Python to achieve
simple tasks.
I have problems to save modified images through QImage objects. The
following code doesn't create any file, and gave in the console the
message "Bogus message code 0".
I'm using python 2.4, Qt GPL 4.1.3, SIP 4.4.3 (20060525 snapshot) and
PyQt 20060606 snapshot.
Is there a known bug, is this a bug or is just my code bad (bad
parameter for format ?) ?
Subsidiary question : I didn't find a bug tracker for PyQt, is there any ?
Thanks a lot for your help.
Christophe
The code :
...
# img2 is a correctly loaded jpeg image, displayed for control in a QLabel
self.img3=self.img2.scaledToWidth(self.img2.width()/2)
self.img3.save(QtCore.QString("d:\test.jpeg"),"JPEG",70)
# no file saved, "Bogus message code 0" printed on console
# img3 is then displayed correctly in another QLabel, so it's internally correct
...
More information about the PyQt
mailing list