Fix in-place conversion of certain QImage formats
In the copying/transcription of the generic converter to the generic in-place converter, a test for Format_RGB32 destination format was mistakenly replaced with test of source format. The result was that a suboptimal pixel store function was selected, and the resulting image data could end up with non-0xff in the unused alpha field. Task-number: QTBUG-132051 Pick-to: 6.9 6.8 Change-Id: If3ebf5fdd7ab6e377c8ad479ea38ce665f922b7c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
2c0d87149c
commit
0ace5ba035
@ -396,7 +396,7 @@ bool convert_generic_inplace(QImageData *data, QImage::Format dst_format, Qt::Im
|
||||
!destLayout->hasAlphaChannel && destLayout->storeFromRGB32) {
|
||||
// Avoid unnecessary premultiply and unpremultiply when converting from unpremultiplied src format.
|
||||
fetch = qPixelLayouts[qt_toPremultipliedFormat(data->format)].fetchToARGB32PM;
|
||||
if (data->format == QImage::Format_RGB32)
|
||||
if (dst_format == QImage::Format_RGB32)
|
||||
store = storeRGB32FromARGB32;
|
||||
else
|
||||
store = destLayout->storeFromRGB32;
|
||||
|
Loading…
x
Reference in New Issue
Block a user