mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-11-18 12:08:48 -05:00
PSD: fix missing setColorCount() when no palette is present
This commit is contained in:
@@ -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());
|
||||||
|
|||||||
Reference in New Issue
Block a user