mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-06-03 17:08:08 -04:00
Fix maximum number of channels (testcase added)
This commit is contained in:
parent
72a1cc23b1
commit
2f27dff48b
BIN
autotests/read/psd/53alphas.png
Normal file
BIN
autotests/read/psd/53alphas.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
BIN
autotests/read/psd/53alphas.psd
Normal file
BIN
autotests/read/psd/53alphas.psd
Normal file
Binary file not shown.
@ -643,7 +643,9 @@ static bool IsValid(const PSDHeader &header)
|
||||
qDebug() << "PSD header: invalid color mode" << header.color_mode;
|
||||
return false;
|
||||
}
|
||||
if (header.channel_count < 1 || header.channel_count > 56) {
|
||||
// Specs tells: "Supported range is 1 to 56" but the limit is 57:
|
||||
// Photoshop does not make you add more (see also 53alphas.psd test case).
|
||||
if (header.channel_count < 1 || header.channel_count > 57) {
|
||||
qDebug() << "PSD header: invalid number of channels" << header.channel_count;
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user