PyQt6 QImage.convertToFormat converts transparent areas
-
I try to convert an image using the code below, but I'm finding even the transparent areas are being converted (to black). How do I prevent transparent areas from being converted?
myimage.convertToFormat(QtGui.QImage.Format.Format_Grayscale8)
-
I try to convert an image using the code below, but I'm finding even the transparent areas are being converted (to black). How do I prevent transparent areas from being converted?
myimage.convertToFormat(QtGui.QImage.Format.Format_Grayscale8)
@Captain-Haddock said in PyQt6 QImage.convertToFormat converts transparent areas:
How do I prevent transparent areas from being converted?
By not converting them to a format which does not support transparency.
-