mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-11-22 10:02:43 -05:00
Fix compilation failure with Qt 6.7
This commit is contained in:
@ -779,10 +779,10 @@ static bool writeImage24(const QImage &image, QDataStream &s, PCXHEADER &header)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
|
||||||
auto cs = image.colorSpace();
|
|
||||||
auto tcs = QColorSpace();
|
auto tcs = QColorSpace();
|
||||||
auto tfmt = image.format();
|
auto tfmt = image.format();
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
||||||
|
auto cs = image.colorSpace();
|
||||||
if (cs.isValid() && cs.colorModel() == QColorSpace::ColorModel::Cmyk && tfmt == QImage::Format_CMYK8888) {
|
if (cs.isValid() && cs.colorModel() == QColorSpace::ColorModel::Cmyk && tfmt == QImage::Format_CMYK8888) {
|
||||||
tcs = QColorSpace(QColorSpace::SRgb);
|
tcs = QColorSpace(QColorSpace::SRgb);
|
||||||
tfmt = QImage::Format_RGB32;
|
tfmt = QImage::Format_RGB32;
|
||||||
|
|||||||
@ -273,10 +273,10 @@ bool SoftimagePICHandler::read(QImage *image)
|
|||||||
bool SoftimagePICHandler::write(const QImage &image)
|
bool SoftimagePICHandler::write(const QImage &image)
|
||||||
{
|
{
|
||||||
bool alpha = image.hasAlphaChannel();
|
bool alpha = image.hasAlphaChannel();
|
||||||
|
auto tcs = QColorSpace();
|
||||||
|
auto tfmt = image.format();
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
||||||
auto cs = image.colorSpace();
|
auto cs = image.colorSpace();
|
||||||
auto tfmt = image.format();
|
|
||||||
auto tcs = QColorSpace();
|
|
||||||
if (cs.isValid() && cs.colorModel() == QColorSpace::ColorModel::Cmyk && tfmt == QImage::Format_CMYK8888) {
|
if (cs.isValid() && cs.colorModel() == QColorSpace::ColorModel::Cmyk && tfmt == QImage::Format_CMYK8888) {
|
||||||
tcs = QColorSpace(QColorSpace::SRgb);
|
tcs = QColorSpace(QColorSpace::SRgb);
|
||||||
tfmt = QImage::Format_RGB32;
|
tfmt = QImage::Format_RGB32;
|
||||||
|
|||||||
@ -764,10 +764,10 @@ bool SGIImagePrivate::writeImage(const QImage &image)
|
|||||||
_dim = 3, _zsize++;
|
_dim = 3, _zsize++;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
|
||||||
auto cs = image.colorSpace();
|
|
||||||
auto tcs = QColorSpace();
|
auto tcs = QColorSpace();
|
||||||
auto tfmt = image.format();
|
auto tfmt = image.format();
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
||||||
|
auto cs = image.colorSpace();
|
||||||
if (cs.isValid() && cs.colorModel() == QColorSpace::ColorModel::Cmyk && tfmt == QImage::Format_CMYK8888) {
|
if (cs.isValid() && cs.colorModel() == QColorSpace::ColorModel::Cmyk && tfmt == QImage::Format_CMYK8888) {
|
||||||
tcs = QColorSpace(QColorSpace::SRgb);
|
tcs = QColorSpace(QColorSpace::SRgb);
|
||||||
tfmt = QImage::Format_RGB32;
|
tfmt = QImage::Format_RGB32;
|
||||||
|
|||||||
@ -988,9 +988,9 @@ bool TGAHandler::writeRGBA(const QImage &image)
|
|||||||
{
|
{
|
||||||
auto format = image.format();
|
auto format = image.format();
|
||||||
const bool hasAlpha = image.hasAlphaChannel();
|
const bool hasAlpha = image.hasAlphaChannel();
|
||||||
|
auto tcs = QColorSpace();
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
||||||
auto cs = image.colorSpace();
|
auto cs = image.colorSpace();
|
||||||
auto tcs = QColorSpace();
|
|
||||||
if (cs.isValid() && cs.colorModel() == QColorSpace::ColorModel::Cmyk && image.format() == QImage::Format_CMYK8888) {
|
if (cs.isValid() && cs.colorModel() == QColorSpace::ColorModel::Cmyk && image.format() == QImage::Format_CMYK8888) {
|
||||||
format = QImage::Format_RGB32;
|
format = QImage::Format_RGB32;
|
||||||
tcs = QColorSpace(QColorSpace::SRgb);
|
tcs = QColorSpace(QColorSpace::SRgb);
|
||||||
|
|||||||
Reference in New Issue
Block a user