Answer the question
In order to leave comments, you need to log in
How to remove alpha channel in Qt?
How can one remove the alpha channel from a QPixmap (replace the transparent area with white or black)?
For example, this terminal command works as it should
find . -name "*.png" -exec convert {} -background black -flatten +matte {}.converted.png \;
Answer the question
In order to leave comments, you need to log in
Convert to a QImage using the toImage() method and then either use the convertToFormat() method or use the pixel(), setPixel() methods and iterate through all the pixels and blend them with the desired color and set the alpha channel to the maximum.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question