PSD: fix missing setColorCount() when no palette is present

This commit is contained in:
Mirco Miranda
2026-11-16 10:39:00 +01:00
parent 42d72fc9b9
commit 6757746d0b
+2
View File
@@ -1152,6 +1152,8 @@ bool PSDHandler::read(QImage *image)
if (!cmds.palette.isEmpty()) { if (!cmds.palette.isEmpty()) {
img.setColorTable(fixIndexedColorTable(cmds.palette)); img.setColorTable(fixIndexedColorTable(cmds.palette));
setTransparencyIndex(img, irs); setTransparencyIndex(img, irs);
} else if (img.format() == QImage::Format_Indexed8) {
img.setColorCount(256);
} }
auto imgChannels = imageChannels(img.format()); auto imgChannels = imageChannels(img.format());