mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
Workaround QTBUG-120614
This commit is contained in:
parent
7d6de20e8c
commit
6cbdf9cf54
@ -73,12 +73,20 @@ const uchar *ScanLineConverter::convertedScanLine(const QImage &image, qint32 y)
|
|||||||
cs = _defaultColorSpace;
|
cs = _defaultColorSpace;
|
||||||
}
|
}
|
||||||
if (tmp.depth() < 24) {
|
if (tmp.depth() < 24) {
|
||||||
tmp = tmp.convertToFormat(tmp.hasAlphaChannel() ? QImage::Format_ARGB32 : QImage::Format_RGB32);
|
tmp.convertTo(tmp.hasAlphaChannel() ? QImage::Format_ARGB32 : QImage::Format_RGB32);
|
||||||
}
|
}
|
||||||
tmp.setColorSpace(cs);
|
tmp.setColorSpace(cs);
|
||||||
tmp.convertToColorSpace(_colorSpace);
|
tmp.convertToColorSpace(_colorSpace);
|
||||||
}
|
}
|
||||||
_convBuffer = tmp.convertToFormat(_targetFormat);
|
|
||||||
|
/*
|
||||||
|
* Work Around for wrong RGBA64 -> 16FPx4/32FPx4 conversion on Intel architecture.
|
||||||
|
* Luckily convertTo() works fine with 16FPx4 images so I can use it instead convertToFormat().
|
||||||
|
* See also: https://bugreports.qt.io/browse/QTBUG-120614
|
||||||
|
*/
|
||||||
|
tmp.convertTo(_targetFormat);
|
||||||
|
_convBuffer = tmp;
|
||||||
|
|
||||||
if (_convBuffer.isNull()) {
|
if (_convBuffer.isNull()) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user