mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-02-13 21:43:02 -05:00
Remove Qt version checks now that 6.8.0 is the minimum required
This commit is contained in:
@ -72,18 +72,12 @@ const uchar *ScanLineConverter::convertedScanLine(const QImage &image, qint32 y)
|
||||
if (!cs.isValid()) {
|
||||
cs = _defaultColorSpace;
|
||||
}
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
||||
if (tmp.depth() < 8 && cs.colorModel() == QColorSpace::ColorModel::Gray) {
|
||||
tmp.convertTo(QImage::Format_Grayscale8);
|
||||
}
|
||||
else if (tmp.depth() < 24 && cs.colorModel() == QColorSpace::ColorModel::Rgb) {
|
||||
tmp.convertTo(tmp.hasAlphaChannel() ? QImage::Format_ARGB32 : QImage::Format_RGB32);
|
||||
}
|
||||
#else
|
||||
if (tmp.depth() < 24) {
|
||||
tmp.convertTo(tmp.hasAlphaChannel() ? QImage::Format_ARGB32 : QImage::Format_RGB32);
|
||||
}
|
||||
#endif
|
||||
tmp.setColorSpace(cs);
|
||||
tmp.convertToColorSpace(_colorSpace);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user