Skip to content

Commit

Permalink
Add an extra check for channel count on undisclosed colorspaces
Browse files Browse the repository at this point in the history
An extra check never hurts
  • Loading branch information
mm2 committed Jul 15, 2024
1 parent 2daf5c5 commit 1c9021b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmsxform.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ cmsBool IsProperColorSpace(cmsColorSpaceSignature Check, cmsUInt32Number dwForm
int Space1 = (int) T_COLORSPACE(dwFormat);
int Space2 = _cmsLCMScolorSpace(Check);

if (Space1 == PT_ANY) return TRUE;
if (Space1 == PT_ANY) return (T_CHANNELS(dwFormat) == cmsChannelsOf(Check));
if (Space1 == Space2) return TRUE;

if (Space1 == PT_LabV2 && Space2 == PT_Lab) return TRUE;
Expand Down

0 comments on commit 1c9021b

Please sign in to comment.