The maximum number of channels explained better

Just a clarification on why the maximum value of channels present in the specifications is not used.
This commit is contained in:
Mirco Miranda 2023-12-20 16:43:12 +00:00 committed by Albert Astals Cid
parent 8d1ef536be
commit 9f24023ca7

View File

@ -631,7 +631,7 @@ static bool IsValid(const PSDHeader &header)
qDebug() << "PSD header: invalid color mode" << header.color_mode;
return false;
}
// Specs tells: "Supported range is 1 to 56" but the limit is 57:
// Specs tells: "Supported range is 1 to 56" but when the alpha channel is present 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;