[Interest] (no subject)

王耀华 mr.asianwang at gmail.com
Thu Jul 23 09:32:51 CEST 2015

Hi list ;)

I’m trying to change the brightness of a QPixmap, the basic idea is simple
as below:
1, convert the QPixmap into a QImage.
2, change every pixel of the QImage with the handy QColor::lighter and
QColor::setPixel function.
3, convert the QImage back to a QPixmap, done.

but the problem is that some white(semi-transparent) pixels are converted
to black !

there’s an example that can reproduce the problem, hope someone can give me

direction to go. Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150723/cb86c8ad/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.zip
Type: application/zip
Size: 4907 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150723/cb86c8ad/attachment.zip>

More information about the Interest mailing list