mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-10-04 10:02:04 -04:00
FF: replace broken #if Q_LITTLE_ENDIAN
Q_LITTLE_ENDIAN was used incorrectly, it should have been
"#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN"
Use qFromBigEndian since it is more explicit.
Fixes 6d5e61f0b0
This commit is contained in:
committed by
Albert Astals Cid
parent
8b8eb91f2b
commit
e23328fda8
@@ -176,11 +176,7 @@ bool FFHandler::read(QImage *image)
|
|||||||
qCWarning(LOG_FFPLUGIN) << "FFHandler::read() error while reading image scanline";
|
qCWarning(LOG_FFPLUGIN) << "FFHandler::read() error while reading image scanline";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#if Q_LITTLE_ENDIAN
|
qFromBigEndian<quint16>(line, size / 2, line);
|
||||||
for (auto i = 0; i < size; i += 2) {
|
|
||||||
std::swap(line[i], line[i + 1]);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
img.setColorSpace(QColorSpace(QColorSpace::SRgb));
|
img.setColorSpace(QColorSpace(QColorSpace::SRgb));
|
||||||
|
|||||||
Reference in New Issue
Block a user