diff --git a/src/imageformats/psd.cpp b/src/imageformats/psd.cpp index afa10b9..b047b64 100644 --- a/src/imageformats/psd.cpp +++ b/src/imageformats/psd.cpp @@ -632,6 +632,10 @@ static QImage::Format imageFormat(const PSDHeader &header, bool alpha) } break; case CM_GRAYSCALE: + if (alpha && header.channel_count < 2) { + // the alpha channel announced is not in the file + break; + } if (header.depth == 32) { format = !alpha ? QImage::Format_RGBX32FPx4 : QImage::Format_RGBA32FPx4_Premultiplied; } else if (header.depth == 16) {