diff --git a/autotests/read/psd/argb16-raw-affinityphoto-1.8.5.png b/autotests/read/psd/argb16-raw-affinityphoto-1.8.5.png new file mode 100644 index 0000000..5b23d15 Binary files /dev/null and b/autotests/read/psd/argb16-raw-affinityphoto-1.8.5.png differ diff --git a/autotests/read/psd/argb16-raw-affinityphoto-1.8.5.psd b/autotests/read/psd/argb16-raw-affinityphoto-1.8.5.psd new file mode 100644 index 0000000..3cce938 Binary files /dev/null and b/autotests/read/psd/argb16-raw-affinityphoto-1.8.5.psd differ diff --git a/autotests/read/psd/rgb16-raw-affinityphoto-1.8.5.png b/autotests/read/psd/rgb16-raw-affinityphoto-1.8.5.png new file mode 100644 index 0000000..835f3ec Binary files /dev/null and b/autotests/read/psd/rgb16-raw-affinityphoto-1.8.5.png differ diff --git a/autotests/read/psd/rgb16-raw-affinityphoto-1.8.5.psd b/autotests/read/psd/rgb16-raw-affinityphoto-1.8.5.psd new file mode 100644 index 0000000..4fe2159 Binary files /dev/null and b/autotests/read/psd/rgb16-raw-affinityphoto-1.8.5.psd differ diff --git a/src/imageformats/psd.cpp b/src/imageformats/psd.cpp index 7fcf2d9..9155667 100644 --- a/src/imageformats/psd.cpp +++ b/src/imageformats/psd.cpp @@ -194,6 +194,10 @@ static bool LoadPSD(QDataStream &stream, const PSDHeader &header, QImage &img) }; if (compression) { + if (header.depth != 8) { + qWarning() << "RLE compressed PSD image with depth != 8 is not supported."; + return false; + } // Skip row lengths. int skip_count = header.height * header.channel_count * sizeof(quint16); if (stream.skipRawData(skip_count) != skip_count) {