From e515daaa2259657319eb9f07181d02af24b4e7fe Mon Sep 17 00:00:00 2001 From: Marti Maria Date: Wed, 31 Aug 2022 23:28:59 +0200 Subject: An old function was returning a wrong value It makes no sense that cmsChannelsOf() returns 3 when colorspace is bugus. Added a new function that returns -1 instead. Will document that in 2.15. It is in the API now, but not in docs. --- include/lcms2.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/lcms2.h b/include/lcms2.h index 331a16f..b7dc886 100644 --- a/include/lcms2.h +++ b/include/lcms2.h @@ -1532,8 +1532,12 @@ CMSAPI cmsBool CMSEXPORT cmsIsCLUT(cmsHPROFILE hProfile, cmsUInt32Numb CMSAPI cmsColorSpaceSignature CMSEXPORT _cmsICCcolorSpace(int OurNotation); CMSAPI int CMSEXPORT _cmsLCMScolorSpace(cmsColorSpaceSignature ProfileSpace); +// Deprecated, use cmsChannelsOfColorSpace instead CMSAPI cmsUInt32Number CMSEXPORT cmsChannelsOf(cmsColorSpaceSignature ColorSpace); +// Get number of channels of color space or -1 if color space is not listed/supported +CMSAPI cmsInt32Number CMSEXPORT cmsChannelsOfColorSpace(cmsColorSpaceSignature ColorSpace); + // Build a suitable formatter for the colorspace of this profile. nBytes=1 means 8 bits, nBytes=2 means 16 bits. CMSAPI cmsUInt32Number CMSEXPORT cmsFormatterForColorspaceOfProfile(cmsHPROFILE hProfile, cmsUInt32Number nBytes, cmsBool lIsFloat); CMSAPI cmsUInt32Number CMSEXPORT cmsFormatterForPCSOfProfile(cmsHPROFILE hProfile, cmsUInt32Number nBytes, cmsBool lIsFloat); -- cgit v1.2.1