diff options
Diffstat (limited to 'src/plugins/imageformats/dds/qddshandler.cpp')
-rw-r--r-- | src/plugins/imageformats/dds/qddshandler.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/imageformats/dds/qddshandler.cpp b/src/plugins/imageformats/dds/qddshandler.cpp index 1d6a178..3a44b51 100644 --- a/src/plugins/imageformats/dds/qddshandler.cpp +++ b/src/plugins/imageformats/dds/qddshandler.cpp @@ -996,7 +996,8 @@ static QImage readA2W10V10U10(QDataStream &s, quint32 width, quint32 height) quint8 b = qint8((tmp & 0x000003ff) >> 0 >> 2) + 128; quint8 a = 0xff * ((tmp & 0xc0000000) >> 30) / 3; // dunno why we should swap b and r here - line[x] = qRgba(b, g, r, a); + std::swap(b, r); + line[x] = qRgba(r, g, b, a); } } @@ -1373,7 +1374,9 @@ static int formatByName(const QByteArray &name) } QDDSHandler::QDDSHandler() : + m_header(), m_format(FormatA8R8G8B8), + m_header10(), m_currentImage(0), m_scanState(ScanNotScanned) { |