diff options
author | Marti Maria <marti.maria@littlecms.com> | 2022-08-31 23:28:59 +0200 |
---|---|---|
committer | Marti Maria <marti.maria@littlecms.com> | 2022-08-31 23:28:59 +0200 |
commit | e515daaa2259657319eb9f07181d02af24b4e7fe (patch) | |
tree | 2a4017058ecf4c21b5c2bb836a4c0f058fc445c3 /include | |
parent | 682d84ccdc6d6f33b73557d8c2e2e73fc4c31025 (diff) | |
download | lcms2-e515daaa2259657319eb9f07181d02af24b4e7fe.tar.gz |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/lcms2.h | 4 |
1 files changed, 4 insertions, 0 deletions
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); |