summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimage.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-12-04 11:30:43 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-12-04 15:09:47 +0100
commit0c19e3f703a7c3fd59e6db8a9d4ac7091674b552 (patch)
tree7bdb07c771acb08026d34766311ae54b22e97b58 /src/gui/image/qimage.cpp
parent0a01396e60e0f214d37a740549b88baf913b2747 (diff)
Fix QImage::setPixelColor on RGBA64_Premultiplied
QColors were not premultiplied before being set. Pick-to: 6.0 5.15 5.12 Change-Id: Id3765b6932a72374ddfd788fae4bb628a4edf0b7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/image/qimage.cpp')
-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());