mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-19 12:14:20 -04:00
Fix maximum number of channels (testcase added)
This commit is contained in:
committed by
Albert Astals Cid
parent
72a1cc23b1
commit
2f27dff48b
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user