ich möchte gerne meine 8-Bit Graufstufenbilder (TIFF-Format) als QImage öffnen und dabei gleich als Format QImage.Format_RGB16. Denn mit
Code: Alles auswählen
QImage('bild.tif')
Code: Alles auswählen
QImage('bild.tif', QImage.Format_RGB16)
Code: Alles auswählen
TypeError: arguments did not match any overloaded call:
QImage(): too many arguments
QImage(QSize, QImage.Format): argument 1 has unexpected type 'str'
QImage(int, int, QImage.Format): argument 1 has unexpected type 'str'
QImage(str, int, int, QImage.Format): not enough arguments
QImage(sip.voidptr, int, int, QImage.Format): argument 1 has unexpected type 'str'
QImage(str, int, int, int, QImage.Format): not enough arguments
QImage(sip.voidptr, int, int, int, QImage.Format): argument 1 has unexpected type 'str'
QImage(list-of-str): argument 1 has unexpected type 'str'
QImage(QString, str format=None): argument 2 has unexpected type 'Format'
QImage(QImage): argument 1 has unexpected type 'str'
QImage(QVariant): too many arguments
Was bedeutet eigentlich dieser Zusatz "str" vor Format? String? Wie passt das mit dem Format-Enum zusammen, das nur Integers liefert? Wenn ich direkt die entsprechende Zahl hinschreibe, geht's auch nicht.
Viele Grüße
antimatter