diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-12-04 11:30:43 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-12-04 16:28:20 +0000 |
commit | 5e548d35928f1efdeae54b6f93144d26eeebaee2 (patch) | |
tree | cf7efa73a76c0e500d1b383f58f6985f98781293 /src | |
parent | 751892a21c796130cdceaa8cee4aeeea18618c5e (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')
-rw-r--r-- | src/gui/image/qimage.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index ef0481bdb2..7b3ca0f7ee 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -2627,12 +2627,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()); |