summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-12-04 11:30:43 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-12-04 16:28:18 +0000
commit6f125dcf1a7677f5728ff6c00594c94df18ec051 (patch)
tree07388accf60ee86a1e76d50fb8cb7354eb9ff790 /src/gui
parent539a16a69fa1ef302cf4eb97ff5a7f8afb606d15 (diff)
Fix QImage::setPixelColor on RGBA64_Premultiplied
QColors were not premultiplied before being set. Change-Id: Id3765b6932a72374ddfd788fae4bb628a4edf0b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 0c19e3f703a7c3fd59e6db8a9d4ac7091674b552) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qimage.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index d05a72acc6..70b958c177 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -2620,12 +2620,9 @@ void QImage::setPixelColor(int x, int y, const QColor &color)
((uint *)s)[x] = qConvertRgb64ToRgb30<PixelOrderRGB>(c);
return;
case Format_RGBX64:
- ((QRgba64 *)s)[x] = color.rgba64();
- ((QRgba64 *)s)[x].setAlpha(65535);
- return;
case Format_RGBA64:
case Format_RGBA64_Premultiplied:
- ((QRgba64 *)s)[x] = color.rgba64();
+ ((QRgba64 *)s)[x] = c;
return;
default:
setPixel(x, y, c.toArgb32());