diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-04-27 12:10:12 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-04-30 10:00:21 +0000 |
commit | 52ddfb36c80f1f0cba4e90d40b43c426687fac41 (patch) | |
tree | 1671e5c4cc5a0217dd5d5377a63a1d1b182fd6a5 /src/gui/image | |
parent | fe086ddb9e4640489595a4c12aef6a27b989ed70 (diff) |
Fix two errors in RGB30 conversions
The one converters from RGB30 was misplaced in the method table, and
the unpremultiplication from A2RGB30 to RGB30 had an underflow mistake
when alpha was 2.
Change-Id: I92c11ede28611a3dbdce72aca1898845c120c209
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/gui/image')
-rw-r--r-- | src/gui/image/qimage_conversions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qimage_conversions.cpp b/src/gui/image/qimage_conversions.cpp index 28e3a48689..e1be032215 100644 --- a/src/gui/image/qimage_conversions.cpp +++ b/src/gui/image/qimage_conversions.cpp @@ -557,7 +557,7 @@ static inline uint qUnpremultiplyRgb30(uint rgb30) } case 2: { uint rgb = rgb30 & 0x3fffffff; - rgb += rgb >> 1; + rgb += (rgb >> 1) & 0x5ff7fdff; return (a << 30) | rgb; } case 3: @@ -2348,10 +2348,10 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat 0, 0, 0, + 0, convert_BGR30_to_RGB30, convert_BGR30_to_RGB30, 0, - 0, convert_passthrough, 0, 0 }, // Format_RGB30 |