PSD: fix use of uninitialized tmp image

This commit is contained in:
Mirco Miranda
2025-11-20 08:16:44 +01:00
committed by Albert Astals Cid
parent 847510f109
commit 472ff92b96

View File

@ -1360,8 +1360,10 @@ bool PSDHandler::read(QImage *image)
#if !defined(PSD_NATIVE_CMYK_SUPPORT_DISABLED) #if !defined(PSD_NATIVE_CMYK_SUPPORT_DISABLED)
if (header.color_mode == CM_CMYK && img.format() != QImage::Format_CMYK8888) { if (header.color_mode == CM_CMYK && img.format() != QImage::Format_CMYK8888) {
auto tmpi = QImage(header.width, 1, QImage::Format_CMYK8888); auto tmpi = QImage(header.width, 1, QImage::Format_CMYK8888);
if (setColorSpace(tmpi, irs)) if (setColorSpace(tmpi, irs)) {
tmpi.fill(0);
tmpCmyk = tmpi; tmpCmyk = tmpi;
}
iccConv.setTargetColorSpace(QColorSpace(QColorSpace::SRgb)); iccConv.setTargetColorSpace(QColorSpace(QColorSpace::SRgb));
} }
#endif #endif