diff --git a/autotests/read/iff/sv5_unc_deep.iff b/autotests/read/iff/sv5_unc_rgb8_deep.iff similarity index 100% rename from autotests/read/iff/sv5_unc_deep.iff rename to autotests/read/iff/sv5_unc_rgb8_deep.iff diff --git a/autotests/read/iff/sv5_unc_deep.png b/autotests/read/iff/sv5_unc_rgb8_deep.png similarity index 100% rename from autotests/read/iff/sv5_unc_deep.png rename to autotests/read/iff/sv5_unc_rgb8_deep.png diff --git a/autotests/read/iff/sv5_unc_rgba16_deep.iff b/autotests/read/iff/sv5_unc_rgba16_deep.iff new file mode 100644 index 0000000..9d65a52 Binary files /dev/null and b/autotests/read/iff/sv5_unc_rgba16_deep.iff differ diff --git a/autotests/read/iff/sv5_unc_rgba16_deep.png b/autotests/read/iff/sv5_unc_rgba16_deep.png new file mode 100644 index 0000000..1741f97 Binary files /dev/null and b/autotests/read/iff/sv5_unc_rgba16_deep.png differ diff --git a/autotests/read/iff/sv5_unc_rgba8_deep.iff b/autotests/read/iff/sv5_unc_rgba8_deep.iff new file mode 100644 index 0000000..2f6a99c Binary files /dev/null and b/autotests/read/iff/sv5_unc_rgba8_deep.iff differ diff --git a/autotests/read/iff/sv5_unc_rgba8_deep.png b/autotests/read/iff/sv5_unc_rgba8_deep.png new file mode 100644 index 0000000..93c4bee Binary files /dev/null and b/autotests/read/iff/sv5_unc_rgba8_deep.png differ diff --git a/src/imageformats/chunks.cpp b/src/imageformats/chunks.cpp index 82e9e0f..817c4fe 100644 --- a/src/imageformats/chunks.cpp +++ b/src/imageformats/chunks.cpp @@ -4069,8 +4069,19 @@ QByteArray DBODChunk::strideRead(QIODevice *d, qint32, const DGBLChunk *header, } // Uncompressed, Rle and TvDeepCompression: one line at a time. - if (rr != size) + if (rr != size) { return {}; + } + + // byte swap + if (auto count = pel->count()) { + if (pel->depth() / count == 16) { + for (auto x = 0, w = qint32(planes.size()) - 1; x < w; x += 2) { + std::swap(planes[x], planes[x + 1]); + } + } + } + return planes; }