mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-11-22 10:02:43 -05:00
PSD: fix use of uninitialized tmp image
This commit is contained in:
committed by
Albert Astals Cid
parent
847510f109
commit
472ff92b96
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user