Return unsupported when reading 16bit RLE compressed PSD files

This commit is contained in:
Gary Wang 2020-11-01 11:50:48 +08:00
parent 2e6eeebdfc
commit b742cb7cc7
5 changed files with 4 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

View File

@ -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) {