Fix findNearestColor for semitransparent colors
The two destcolors and the buffer are all already premultiplied. This would double premultiply them. Pick-to: 6.5 6.2 Change-Id: I235bee616d8e0033b87c6f96464f0926af7bd29a Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> (cherry picked from commit b637607789a9e92a0dd0ff7fb31b9a92a10ef0bf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
4d691cfc8a
commit
8702853313
@ -513,9 +513,8 @@ static DestFetchProcFP destFetchProcFP[QImage::NImageFormats] =
|
||||
*/
|
||||
static inline QRgb findNearestColor(QRgb color, QRasterBuffer *rbuf)
|
||||
{
|
||||
QRgb color_0 = qPremultiply(rbuf->destColor0);
|
||||
QRgb color_1 = qPremultiply(rbuf->destColor1);
|
||||
color = qPremultiply(color);
|
||||
const QRgb color_0 = rbuf->destColor0;
|
||||
const QRgb color_1 = rbuf->destColor1;
|
||||
|
||||
int r = qRed(color);
|
||||
int g = qGreen(color);
|
||||
|
Loading…
x
Reference in New Issue
Block a user