Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/lcms2/include/lcms2mt.h @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 //--------------------------------------------------------------------------------- | |
| 2 // | |
| 3 // Little Color Management System | |
| 4 // Copyright (c) 1998-2023 Marti Maria Saguer | |
| 5 // | |
| 6 // Permission is hereby granted, free of charge, to any person obtaining | |
| 7 // a copy of this software and associated documentation files (the "Software"), | |
| 8 // to deal in the Software without restriction, including without limitation | |
| 9 // the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| 10 // and/or sell copies of the Software, and to permit persons to whom the Software | |
| 11 // is furnished to do so, subject to the following conditions: | |
| 12 // | |
| 13 // The above copyright notice and this permission notice shall be included in | |
| 14 // all copies or substantial portions of the Software. | |
| 15 // | |
| 16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
| 17 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO | |
| 18 // THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
| 19 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | |
| 20 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | |
| 21 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
| 22 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
| 23 // | |
| 24 //--------------------------------------------------------------------------------- | |
| 25 // | |
| 26 // Version 2.16 | |
| 27 // | |
| 28 | |
| 29 #ifndef _lcms2mt_H | |
| 30 | |
| 31 // ********** Configuration toggles **************************************** | |
| 32 | |
| 33 // Uncomment this one if you are using big endian machines | |
| 34 // #define CMS_USE_BIG_ENDIAN 1 | |
| 35 | |
| 36 // Uncomment this one if your compiler/machine does NOT support the | |
| 37 // "long long" type. | |
| 38 // #define CMS_DONT_USE_INT64 1 | |
| 39 | |
| 40 // Uncomment this if your compiler doesn't work with fast floor function | |
| 41 // #define CMS_DONT_USE_FAST_FLOOR 1 | |
| 42 | |
| 43 // Uncomment this line if you want lcms to use the black point tag in profile, | |
| 44 // if commented, lcms will compute the black point by its own. | |
| 45 // It is safer to leave it commented out | |
| 46 // #define CMS_USE_PROFILE_BLACK_POINT_TAG 1 | |
| 47 | |
| 48 // Uncomment this line if you are compiling as C++ and want a C++ API | |
| 49 // #define CMS_USE_CPP_API | |
| 50 | |
| 51 // Uncomment this line if you need strict CGATS syntax. Makes CGATS files to | |
| 52 // require "KEYWORD" on undefined identifiers, keep it commented out unless needed | |
| 53 // #define CMS_STRICT_CGATS 1 | |
| 54 | |
| 55 // Uncomment to get rid of the tables for "half" float support | |
| 56 // #define CMS_NO_HALF_SUPPORT 1 | |
| 57 | |
| 58 // Uncomment to get rid of pthreads/windows dependency | |
| 59 // #define CMS_NO_PTHREADS 1 | |
| 60 | |
| 61 // Uncomment this for special windows mutex initialization (see lcms2_internal.h) | |
| 62 // #define CMS_RELY_ON_WINDOWS_STATIC_MUTEX_INIT | |
| 63 | |
| 64 // Uncomment this to remove the "register" storage class | |
| 65 // #define CMS_NO_REGISTER_KEYWORD 1 | |
| 66 | |
| 67 // ********** End of configuration toggles ****************************** | |
| 68 | |
| 69 // Needed for streams | |
| 70 #include <stdio.h> | |
| 71 | |
| 72 // Needed for portability (C99 per 7.1.2) | |
| 73 #include <limits.h> | |
| 74 #include <time.h> | |
| 75 #include <stddef.h> | |
| 76 | |
| 77 #ifndef CMS_USE_CPP_API | |
| 78 # ifdef __cplusplus | |
| 79 # if __cplusplus >= 201703L | |
| 80 # define CMS_NO_REGISTER_KEYWORD 1 | |
| 81 # endif | |
| 82 extern "C" { | |
| 83 # endif | |
| 84 #endif | |
| 85 | |
| 86 // Version/release | |
| 87 // Vanilla LCMS2 uses values from 2000-2160. This is | |
| 88 // used as an unsigned number. We want any attempt to | |
| 89 // use OUR numbers with a mainline LCMS to fail, so | |
| 90 // we have to go under 2000-2100. Let's subtract | |
| 91 // 2000 from the mainline release. | |
| 92 #define LCMS_VERSION (2160 - 2000) | |
| 93 | |
| 94 // We expect any LCMS2MT release to fall within the | |
| 95 // following range. | |
| 96 #define LCMS2MT_VERSION_MIN (0) | |
| 97 #define LCMS2MT_VERSION_MAX (999) | |
| 98 | |
| 99 // I will give the chance of redefining basic types for compilers that are not fully C99 compliant | |
| 100 #ifndef CMS_BASIC_TYPES_ALREADY_DEFINED | |
| 101 | |
| 102 // Base types | |
| 103 typedef unsigned char cmsUInt8Number; // That is guaranteed by the C99 spec | |
| 104 typedef signed char cmsInt8Number; // That is guaranteed by the C99 spec | |
| 105 | |
| 106 #if CHAR_BIT != 8 | |
| 107 # error "Unable to find 8 bit type, unsupported compiler" | |
| 108 #endif | |
| 109 | |
| 110 // IEEE float storage numbers | |
| 111 typedef float cmsFloat32Number; | |
| 112 typedef double cmsFloat64Number; | |
| 113 | |
| 114 // 16-bit base types | |
| 115 #if (USHRT_MAX == 65535U) | |
| 116 typedef unsigned short cmsUInt16Number; | |
| 117 #elif (UINT_MAX == 65535U) | |
| 118 typedef unsigned int cmsUInt16Number; | |
| 119 #else | |
| 120 # error "Unable to find 16 bits unsigned type, unsupported compiler" | |
| 121 #endif | |
| 122 | |
| 123 #if (SHRT_MAX == 32767) | |
| 124 typedef short cmsInt16Number; | |
| 125 #elif (INT_MAX == 32767) | |
| 126 typedef int cmsInt16Number; | |
| 127 #else | |
| 128 # error "Unable to find 16 bits signed type, unsupported compiler" | |
| 129 #endif | |
| 130 | |
| 131 // 32-bit base type | |
| 132 #if (UINT_MAX == 4294967295U) | |
| 133 typedef unsigned int cmsUInt32Number; | |
| 134 #elif (ULONG_MAX == 4294967295U) | |
| 135 typedef unsigned long cmsUInt32Number; | |
| 136 #else | |
| 137 # error "Unable to find 32 bit unsigned type, unsupported compiler" | |
| 138 #endif | |
| 139 | |
| 140 #if (INT_MAX == +2147483647) | |
| 141 typedef int cmsInt32Number; | |
| 142 #elif (LONG_MAX == +2147483647) | |
| 143 typedef long cmsInt32Number; | |
| 144 #else | |
| 145 # error "Unable to find 32 bit signed type, unsupported compiler" | |
| 146 #endif | |
| 147 | |
| 148 // 64-bit base types | |
| 149 #ifndef CMS_DONT_USE_INT64 | |
| 150 # if (ULONG_MAX == 18446744073709551615U) | |
| 151 typedef unsigned long cmsUInt64Number; | |
| 152 # elif (ULLONG_MAX == 18446744073709551615U) | |
| 153 typedef unsigned long long cmsUInt64Number; | |
| 154 # else | |
| 155 # define CMS_DONT_USE_INT64 1 | |
| 156 # endif | |
| 157 # if (LONG_MAX == +9223372036854775807) | |
| 158 typedef long cmsInt64Number; | |
| 159 # elif (LLONG_MAX == +9223372036854775807) | |
| 160 typedef long long cmsInt64Number; | |
| 161 # else | |
| 162 # define CMS_DONT_USE_INT64 1 | |
| 163 # endif | |
| 164 #endif | |
| 165 #endif | |
| 166 | |
| 167 // Handle "register" keyword | |
| 168 #if defined(CMS_NO_REGISTER_KEYWORD) | |
| 169 # define CMSREGISTER | |
| 170 #else | |
| 171 # define CMSREGISTER register | |
| 172 #endif | |
| 173 | |
| 174 // In the case 64 bit numbers are not supported by the compiler | |
| 175 #ifdef CMS_DONT_USE_INT64 | |
| 176 typedef cmsUInt32Number cmsUInt64Number[2]; | |
| 177 typedef cmsInt32Number cmsInt64Number[2]; | |
| 178 #endif | |
| 179 | |
| 180 // Derivative types | |
| 181 typedef cmsUInt32Number cmsSignature; | |
| 182 typedef cmsUInt16Number cmsU8Fixed8Number; | |
| 183 typedef cmsInt32Number cmsS15Fixed16Number; | |
| 184 typedef cmsUInt32Number cmsU16Fixed16Number; | |
| 185 | |
| 186 // Boolean type, which will be using the native integer | |
| 187 typedef int cmsBool; | |
| 188 | |
| 189 // Try to detect windows | |
| 190 #if defined (_WIN32) || defined(_WIN64) || defined(WIN32) || defined(_WIN32_) | |
| 191 # define CMS_IS_WINDOWS_ 1 | |
| 192 #endif | |
| 193 | |
| 194 #ifdef _MSC_VER | |
| 195 # define CMS_IS_WINDOWS_ 1 | |
| 196 #endif | |
| 197 | |
| 198 #ifdef __BORLANDC__ | |
| 199 # define CMS_IS_WINDOWS_ 1 | |
| 200 #endif | |
| 201 | |
| 202 // Try to detect big endian platforms. This list can be endless, so primarily rely on the configure script | |
| 203 // on Unix-like systems, and allow it to be set on the compiler command line using | |
| 204 // -DCMS_USE_BIG_ENDIAN or something similar | |
| 205 #ifdef CMS_USE_BIG_ENDIAN // set at compiler command line takes overall precedence | |
| 206 | |
| 207 # if CMS_USE_BIG_ENDIAN == 0 | |
| 208 # undef CMS_USE_BIG_ENDIAN | |
| 209 # endif | |
| 210 | |
| 211 #else // CMS_USE_BIG_ENDIAN | |
| 212 | |
| 213 # ifdef WORDS_BIGENDIAN // set by configure (or explicitly on compiler command line) | |
| 214 # define CMS_USE_BIG_ENDIAN 1 | |
| 215 # else // WORDS_BIGENDIAN | |
| 216 // Fall back to platform/compiler specific tests | |
| 217 # if defined(__sgi__) || defined(__sgi) || defined(sparc) | |
| 218 # define CMS_USE_BIG_ENDIAN 1 | |
| 219 # endif | |
| 220 | |
| 221 # if defined(__s390__) || defined(__s390x__) | |
| 222 # define CMS_USE_BIG_ENDIAN 1 | |
| 223 # endif | |
| 224 | |
| 225 # ifdef macintosh | |
| 226 # ifdef __BIG_ENDIAN__ | |
| 227 # define CMS_USE_BIG_ENDIAN 1 | |
| 228 # endif | |
| 229 # ifdef __LITTLE_ENDIAN__ | |
| 230 # undef CMS_USE_BIG_ENDIAN | |
| 231 # endif | |
| 232 # endif | |
| 233 # endif // WORDS_BIGENDIAN | |
| 234 | |
| 235 # if defined(_HOST_BIG_ENDIAN) || defined(__BIG_ENDIAN__) | |
| 236 # define CMS_USE_BIG_ENDIAN 1 | |
| 237 # endif | |
| 238 | |
| 239 #endif // CMS_USE_BIG_ENDIAN | |
| 240 | |
| 241 | |
| 242 // Calling convention -- this is hardly platform and compiler dependent | |
| 243 #if defined(CMS_IS_WINDOWS_) && !defined(__GNUC__) | |
| 244 # if defined(CMS_DLL) || defined(CMS_DLL_BUILD) | |
| 245 # ifdef __BORLANDC__ | |
| 246 # define CMSEXPORT __stdcall _export | |
| 247 # define CMSAPI | |
| 248 # else | |
| 249 # define CMSEXPORT __stdcall | |
| 250 # ifdef CMS_DLL_BUILD | |
| 251 # define CMSAPI __declspec(dllexport) | |
| 252 # else | |
| 253 # define CMSAPI __declspec(dllimport) | |
| 254 # endif | |
| 255 # endif | |
| 256 # else | |
| 257 # define CMSEXPORT | |
| 258 # define CMSAPI | |
| 259 # endif | |
| 260 #else // not Windows | |
| 261 # ifdef HAVE_FUNC_ATTRIBUTE_VISIBILITY | |
| 262 # define CMSEXPORT | |
| 263 # define CMSAPI __attribute__((visibility("default"))) | |
| 264 #else | |
| 265 # define CMSEXPORT | |
| 266 # define CMSAPI | |
| 267 #endif | |
| 268 #endif // CMS_IS_WINDOWS_ | |
| 269 | |
| 270 #ifdef HasTHREADS | |
| 271 # if HasTHREADS == 1 | |
| 272 # undef CMS_NO_PTHREADS | |
| 273 # else | |
| 274 # define CMS_NO_PTHREADS 1 | |
| 275 # endif | |
| 276 #endif | |
| 277 | |
| 278 #ifdef LCMS2MT_PREFIX | |
| 279 | |
| 280 #define LCMS2MT_XCAT(A,B) A##B | |
| 281 #define LCMS2MT_CAT(A,B) LCMS2MT_XCAT(A,B) | |
| 282 #define LCMS2MT_PREF(B) LCMS2MT_CAT(LCMS2MT_PREFIX,B) | |
| 283 | |
| 284 #define _cms15Fixed16toDouble LCMS2MT_PREF(_cms15Fixed16toDouble) | |
| 285 #define _cms8Fixed8toDouble LCMS2MT_PREF(_cms8Fixed8toDouble) | |
| 286 #define cmsAdaptToIlluminant LCMS2MT_PREF(cmsAdaptToIlluminant) | |
| 287 #define _cmsAdjustEndianess16 LCMS2MT_PREF(_cmsAdjustEndianess16) | |
| 288 #define _cmsAdjustEndianess32 LCMS2MT_PREF(_cmsAdjustEndianess32) | |
| 289 #define _cmsAdjustEndianess64 LCMS2MT_PREF(_cmsAdjustEndianess64) | |
| 290 #define cmsAllocNamedColorList LCMS2MT_PREF(cmsAllocNamedColorList) | |
| 291 #define cmsAllocProfileSequenceDescription LCMS2MT_PREF(cmsAllocProfileSequenceDescription) | |
| 292 #define cmsAppendNamedColor LCMS2MT_PREF(cmsAppendNamedColor) | |
| 293 #define cmsBFDdeltaE LCMS2MT_PREF(cmsBFDdeltaE) | |
| 294 #define cmsBuildGamma LCMS2MT_PREF(cmsBuildGamma) | |
| 295 #define cmsBuildParametricToneCurve LCMS2MT_PREF(cmsBuildParametricToneCurve) | |
| 296 #define cmsBuildSegmentedToneCurve LCMS2MT_PREF(cmsBuildSegmentedToneCurve) | |
| 297 #define cmsBuildTabulatedToneCurve16 LCMS2MT_PREF(cmsBuildTabulatedToneCurve16) | |
| 298 #define cmsBuildTabulatedToneCurveFloat LCMS2MT_PREF(cmsBuildTabulatedToneCurveFloat) | |
| 299 #define _cmsCalloc LCMS2MT_PREF(_cmsCalloc) | |
| 300 #define cmsChannelsOf LCMS2MT_PREF(cmsChannelsOf) | |
| 301 #define cmsChannelsOfColorSpace LCMS2MT_PREF(cmsChannelsOfColorSpace) | |
| 302 #define cmsCIE2000DeltaE LCMS2MT_PREF(cmsCIE2000DeltaE) | |
| 303 #define cmsCIE94DeltaE LCMS2MT_PREF(cmsCIE94DeltaE) | |
| 304 #define cmsCIECAM02Done LCMS2MT_PREF(cmsCIECAM02Done) | |
| 305 #define cmsCIECAM02Forward LCMS2MT_PREF(cmsCIECAM02Forward) | |
| 306 #define cmsCIECAM02Init LCMS2MT_PREF(cmsCIECAM02Init) | |
| 307 #define cmsCIECAM02Reverse LCMS2MT_PREF(cmsCIECAM02Reverse) | |
| 308 #define cmsCloseIOhandler LCMS2MT_PREF(cmsCloseIOhandler) | |
| 309 #define cmsCloseProfile LCMS2MT_PREF(cmsCloseProfile) | |
| 310 #define cmsCMCdeltaE LCMS2MT_PREF(cmsCMCdeltaE) | |
| 311 #define cmsCreate_sRGBProfile LCMS2MT_PREF(cmsCreate_sRGBProfile) | |
| 312 #define cmsCreateBCHSWabstractProfile LCMS2MT_PREF(cmsCreateBCHSWabstractProfile) | |
| 313 #define cmsCreateExtendedTransform LCMS2MT_PREF(cmsCreateExtendedTransform) | |
| 314 #define cmsCreateGrayProfile LCMS2MT_PREF(cmsCreateGrayProfile) | |
| 315 #define cmsCreateInkLimitingDeviceLink LCMS2MT_PREF(cmsCreateInkLimitingDeviceLink) | |
| 316 #define cmsCreateLab2Profile LCMS2MT_PREF(cmsCreateLab2Profile) | |
| 317 #define cmsCreateLab4Profile LCMS2MT_PREF(cmsCreateLab4Profile) | |
| 318 #define cmsCreateLinearizationDeviceLink LCMS2MT_PREF(cmsCreateLinearizationDeviceLink) | |
| 319 #define cmsCreateMultiprofileTransform LCMS2MT_PREF(cmsCreateMultiprofileTransform) | |
| 320 #define cmsCreateNULLProfile LCMS2MT_PREF(cmsCreateNULLProfile) | |
| 321 #define cmsCreateProfilePlaceholder LCMS2MT_PREF(cmsCreateProfilePlaceholder) | |
| 322 #define cmsCreateProofingTransform LCMS2MT_PREF(cmsCreateProofingTransform) | |
| 323 #define cmsCreateRGBProfile LCMS2MT_PREF(cmsCreateRGBProfile) | |
| 324 #define cmsCreateTransform LCMS2MT_PREF(cmsCreateTransform) | |
| 325 #define cmsCreateXYZProfile LCMS2MT_PREF(cmsCreateXYZProfile) | |
| 326 #define cmsD50_xyY LCMS2MT_PREF(cmsD50_xyY) | |
| 327 #define cmsD50_XYZ LCMS2MT_PREF(cmsD50_XYZ) | |
| 328 #define _cmsDecodeDateTimeNumber LCMS2MT_PREF(_cmsDecodeDateTimeNumber) | |
| 329 #define _cmsDefaultICCintents LCMS2MT_PREF(_cmsDefaultICCintents) | |
| 330 #define cmsDeleteTransform LCMS2MT_PREF(cmsDeleteTransform) | |
| 331 #define cmsDeltaE LCMS2MT_PREF(cmsDeltaE) | |
| 332 #define cmsDetectBlackPoint LCMS2MT_PREF(cmsDetectBlackPoint) | |
| 333 #define cmsDetectDestinationBlackPoint LCMS2MT_PREF(cmsDetectDestinationBlackPoint) | |
| 334 #define cmsDetectTAC LCMS2MT_PREF(cmsDetectTAC) | |
| 335 #define cmsDesaturateLab LCMS2MT_PREF(cmsDesaturateLab) | |
| 336 #define cmsDoTransform LCMS2MT_PREF(cmsDoTransform) | |
| 337 #define cmsDoTransformStride LCMS2MT_PREF(cmsDoTransformStride) | |
| 338 #define cmsDoTransformLineStride LCMS2MT_PREF(cmsDoTransformLineStride) | |
| 339 #define _cmsDoubleTo15Fixed16 LCMS2MT_PREF(_cmsDoubleTo15Fixed16) | |
| 340 #define _cmsDoubleTo8Fixed8 LCMS2MT_PREF(_cmsDoubleTo8Fixed8) | |
| 341 #define _cmsDupMem LCMS2MT_PREF(_cmsDupMem) | |
| 342 #define cmsDupNamedColorList LCMS2MT_PREF(cmsDupNamedColorList) | |
| 343 #define cmsDupProfileSequenceDescription LCMS2MT_PREF(cmsDupProfileSequenceDescription) | |
| 344 #define cmsDupToneCurve LCMS2MT_PREF(cmsDupToneCurve) | |
| 345 #define _cmsEncodeDateTimeNumber LCMS2MT_PREF(_cmsEncodeDateTimeNumber) | |
| 346 #define cmsEstimateGamma LCMS2MT_PREF(cmsEstimateGamma) | |
| 347 #define cmsGetToneCurveEstimatedTableEntries LCMS2MT_PREF(cmsGetToneCurveEstimatedTableEntries) | |
| 348 #define cmsGetToneCurveEstimatedTable LCMS2MT_PREF(cmsGetToneCurveEstimatedTable) | |
| 349 #define cmsEvalToneCurve16 LCMS2MT_PREF(cmsEvalToneCurve16) | |
| 350 #define cmsEvalToneCurveFloat LCMS2MT_PREF(cmsEvalToneCurveFloat) | |
| 351 #define cmsfilelength LCMS2MT_PREF(cmsfilelength) | |
| 352 #define cmsFloat2LabEncoded LCMS2MT_PREF(cmsFloat2LabEncoded) | |
| 353 #define cmsFloat2LabEncodedV2 LCMS2MT_PREF(cmsFloat2LabEncodedV2) | |
| 354 #define cmsFloat2XYZEncoded LCMS2MT_PREF(cmsFloat2XYZEncoded) | |
| 355 #define cmsFormatterForColorspaceOfProfile LCMS2MT_PREF(cmsFormatterForColorspaceOfProfile) | |
| 356 #define cmsFormatterForPCSOfProfile LCMS2MT_PREF(cmsFormatterForPCSOfProfile) | |
| 357 #define _cmsFree LCMS2MT_PREF(_cmsFree) | |
| 358 #define cmsFreeNamedColorList LCMS2MT_PREF(cmsFreeNamedColorList) | |
| 359 #define cmsFreeProfileSequenceDescription LCMS2MT_PREF(cmsFreeProfileSequenceDescription) | |
| 360 #define cmsFreeToneCurve LCMS2MT_PREF(cmsFreeToneCurve) | |
| 361 #define cmsFreeToneCurveTriple LCMS2MT_PREF(cmsFreeToneCurveTriple) | |
| 362 #define cmsGBDAlloc LCMS2MT_PREF(cmsGBDAlloc) | |
| 363 #define cmsGBDFree LCMS2MT_PREF(cmsGBDFree) | |
| 364 #define cmsGDBAddPoint LCMS2MT_PREF(cmsGDBAddPoint) | |
| 365 #define cmsGDBCheckPoint LCMS2MT_PREF(cmsGDBCheckPoint) | |
| 366 #define cmsGDBCompute LCMS2MT_PREF(cmsGDBCompute) | |
| 367 #define cmsGetAlarmCodes LCMS2MT_PREF(cmsGetAlarmCodes) | |
| 368 #define cmsGetColorSpace LCMS2MT_PREF(cmsGetColorSpace) | |
| 369 #define cmsGetDeviceClass LCMS2MT_PREF(cmsGetDeviceClass) | |
| 370 #define cmsGetEncodedICCversion LCMS2MT_PREF(cmsGetEncodedICCversion) | |
| 371 #define cmsGetHeaderAttributes LCMS2MT_PREF(cmsGetHeaderAttributes) | |
| 372 #define cmsGetHeaderCreationDateTime LCMS2MT_PREF(cmsGetHeaderCreationDateTime) | |
| 373 #define cmsGetHeaderFlags LCMS2MT_PREF(cmsGetHeaderFlags) | |
| 374 #define cmsGetHeaderManufacturer LCMS2MT_PREF(cmsGetHeaderManufacturer) | |
| 375 #define cmsGetHeaderModel LCMS2MT_PREF(cmsGetHeaderModel) | |
| 376 #define cmsGetHeaderProfileID LCMS2MT_PREF(cmsGetHeaderProfileID) | |
| 377 #define cmsGetHeaderRenderingIntent LCMS2MT_PREF(cmsGetHeaderRenderingIntent) | |
| 378 #define cmsGetNamedColorList LCMS2MT_PREF(cmsGetNamedColorList) | |
| 379 #define cmsGetPCS LCMS2MT_PREF(cmsGetPCS) | |
| 380 #define cmsGetPostScriptColorResource LCMS2MT_PREF(cmsGetPostScriptColorResource) | |
| 381 #define cmsGetPostScriptCRD LCMS2MT_PREF(cmsGetPostScriptCRD) | |
| 382 #define cmsGetPostScriptCSA LCMS2MT_PREF(cmsGetPostScriptCSA) | |
| 383 #define cmsGetProfileInfo LCMS2MT_PREF(cmsGetProfileInfo) | |
| 384 #define cmsGetProfileInfoASCII LCMS2MT_PREF(cmsGetProfileInfoASCII) | |
| 385 #define cmsGetProfileInfoUTF8 LCMS2MT_PREF(cmsGetProfileInfoUTF8) | |
| 386 #define cmsGetProfileVersion LCMS2MT_PREF(cmsGetProfileVersion) | |
| 387 #define cmsGetSupportedIntents LCMS2MT_PREF(cmsGetSupportedIntents) | |
| 388 #define cmsGetTagCount LCMS2MT_PREF(cmsGetTagCount) | |
| 389 #define cmsGetTagSignature LCMS2MT_PREF(cmsGetTagSignature) | |
| 390 #define _cmsICCcolorSpace LCMS2MT_PREF(_cmsICCcolorSpace) | |
| 391 #define _cmsIOPrintf LCMS2MT_PREF(_cmsIOPrintf) | |
| 392 #define cmsIsCLUT LCMS2MT_PREF(cmsIsCLUT) | |
| 393 #define cmsIsIntentSupported LCMS2MT_PREF(cmsIsIntentSupported) | |
| 394 #define cmsIsMatrixShaper LCMS2MT_PREF(cmsIsMatrixShaper) | |
| 395 #define cmsIsTag LCMS2MT_PREF(cmsIsTag) | |
| 396 #define cmsIsToneCurveDescending LCMS2MT_PREF(cmsIsToneCurveDescending) | |
| 397 #define cmsIsToneCurveLinear LCMS2MT_PREF(cmsIsToneCurveLinear) | |
| 398 #define cmsIsToneCurveMonotonic LCMS2MT_PREF(cmsIsToneCurveMonotonic) | |
| 399 #define cmsIsToneCurveMultisegment LCMS2MT_PREF(cmsIsToneCurveMultisegment) | |
| 400 #define cmsGetToneCurveParametricType LCMS2MT_PREF(cmsGetToneCurveParametricType) | |
| 401 #define cmsIT8Alloc LCMS2MT_PREF(cmsIT8Alloc) | |
| 402 #define cmsIT8DefineDblFormat LCMS2MT_PREF(cmsIT8DefineDblFormat) | |
| 403 #define cmsIT8EnumDataFormat LCMS2MT_PREF(cmsIT8EnumDataFormat) | |
| 404 #define cmsIT8EnumProperties LCMS2MT_PREF(cmsIT8EnumProperties) | |
| 405 #define cmsIT8EnumPropertyMulti LCMS2MT_PREF(cmsIT8EnumPropertyMulti) | |
| 406 #define cmsIT8Free LCMS2MT_PREF(cmsIT8Free) | |
| 407 #define cmsIT8GetData LCMS2MT_PREF(cmsIT8GetData) | |
| 408 #define cmsIT8GetDataDbl LCMS2MT_PREF(cmsIT8GetDataDbl) | |
| 409 #define cmsIT8FindDataFormat LCMS2MT_PREF(cmsIT8FindDataFormat) | |
| 410 #define cmsIT8GetDataRowCol LCMS2MT_PREF(cmsIT8GetDataRowCol) | |
| 411 #define cmsIT8GetDataRowColDbl LCMS2MT_PREF(cmsIT8GetDataRowColDbl) | |
| 412 #define cmsIT8GetPatchName LCMS2MT_PREF(cmsIT8GetPatchName) | |
| 413 #define cmsIT8GetPatchByName LCMS2MT_PREF(cmsIT8GetPatchByName) | |
| 414 #define cmsIT8GetProperty LCMS2MT_PREF(cmsIT8GetProperty) | |
| 415 #define cmsIT8GetPropertyDbl LCMS2MT_PREF(cmsIT8GetPropertyDbl) | |
| 416 #define cmsIT8GetPropertyMulti LCMS2MT_PREF(cmsIT8GetPropertyMulti) | |
| 417 #define cmsIT8GetSheetType LCMS2MT_PREF(cmsIT8GetSheetType) | |
| 418 #define cmsIT8LoadFromFile LCMS2MT_PREF(cmsIT8LoadFromFile) | |
| 419 #define cmsIT8LoadFromMem LCMS2MT_PREF(cmsIT8LoadFromMem) | |
| 420 #define cmsIT8SaveToFile LCMS2MT_PREF(cmsIT8SaveToFile) | |
| 421 #define cmsIT8SaveToMem LCMS2MT_PREF(cmsIT8SaveToMem) | |
| 422 #define cmsIT8SetComment LCMS2MT_PREF(cmsIT8SetComment) | |
| 423 #define cmsIT8SetData LCMS2MT_PREF(cmsIT8SetData) | |
| 424 #define cmsIT8SetDataDbl LCMS2MT_PREF(cmsIT8SetDataDbl) | |
| 425 #define cmsIT8SetDataFormat LCMS2MT_PREF(cmsIT8SetDataFormat) | |
| 426 #define cmsIT8SetDataRowCol LCMS2MT_PREF(cmsIT8SetDataRowCol) | |
| 427 #define cmsIT8SetDataRowColDbl LCMS2MT_PREF(cmsIT8SetDataRowColDbl) | |
| 428 #define cmsIT8SetPropertyDbl LCMS2MT_PREF(cmsIT8SetPropertyDbl) | |
| 429 #define cmsIT8SetPropertyHex LCMS2MT_PREF(cmsIT8SetPropertyHex) | |
| 430 #define cmsIT8SetPropertyStr LCMS2MT_PREF(cmsIT8SetPropertyStr) | |
| 431 #define cmsIT8SetPropertyMulti LCMS2MT_PREF(cmsIT8SetPropertyMulti) | |
| 432 #define cmsIT8SetPropertyUncooked LCMS2MT_PREF(cmsIT8SetPropertyUncooked) | |
| 433 #define cmsIT8SetSheetType LCMS2MT_PREF(cmsIT8SetSheetType) | |
| 434 #define cmsIT8SetTable LCMS2MT_PREF(cmsIT8SetTable) | |
| 435 #define cmsIT8SetTableByLabel LCMS2MT_PREF(cmsIT8SetTableByLabel) | |
| 436 #define cmsIT8SetIndexColumn LCMS2MT_PREF(cmsIT8SetIndexColumn) | |
| 437 #define cmsIT8TableCount LCMS2MT_PREF(cmsIT8TableCount) | |
| 438 #define cmsJoinToneCurve LCMS2MT_PREF(cmsJoinToneCurve) | |
| 439 #define cmsLab2LCh LCMS2MT_PREF(cmsLab2LCh) | |
| 440 #define cmsLab2XYZ LCMS2MT_PREF(cmsLab2XYZ) | |
| 441 #define cmsLabEncoded2Float LCMS2MT_PREF(cmsLabEncoded2Float) | |
| 442 #define cmsLabEncoded2FloatV2 LCMS2MT_PREF(cmsLabEncoded2FloatV2) | |
| 443 #define cmsLCh2Lab LCMS2MT_PREF(cmsLCh2Lab) | |
| 444 #define _cmsLCMScolorSpace LCMS2MT_PREF(_cmsLCMScolorSpace) | |
| 445 #define cmsLinkTag LCMS2MT_PREF(cmsLinkTag) | |
| 446 #define cmsTagLinkedTo LCMS2MT_PREF(cmsTagLinkedTo) | |
| 447 #define cmsPipelineAlloc LCMS2MT_PREF(cmsPipelineAlloc) | |
| 448 #define cmsPipelineCat LCMS2MT_PREF(cmsPipelineCat) | |
| 449 #define cmsPipelineCheckAndRetreiveStages LCMS2MT_PREF(cmsPipelineCheckAndRetreiveStages) | |
| 450 #define cmsPipelineDup LCMS2MT_PREF(cmsPipelineDup) | |
| 451 #define cmsPipelineStageCount LCMS2MT_PREF(cmsPipelineStageCount) | |
| 452 #define cmsPipelineEval16 LCMS2MT_PREF(cmsPipelineEval16) | |
| 453 #define cmsPipelineEvalFloat LCMS2MT_PREF(cmsPipelineEvalFloat) | |
| 454 #define cmsPipelineEvalReverseFloat LCMS2MT_PREF(cmsPipelineEvalReverseFloat) | |
| 455 #define cmsPipelineFree LCMS2MT_PREF(cmsPipelineFree) | |
| 456 #define cmsPipelineGetPtrToFirstStage LCMS2MT_PREF(cmsPipelineGetPtrToFirstStage) | |
| 457 #define cmsPipelineGetPtrToLastStage LCMS2MT_PREF(cmsPipelineGetPtrToLastStage) | |
| 458 #define cmsPipelineInputChannels LCMS2MT_PREF(cmsPipelineInputChannels) | |
| 459 #define cmsPipelineInsertStage LCMS2MT_PREF(cmsPipelineInsertStage) | |
| 460 #define cmsPipelineOutputChannels LCMS2MT_PREF(cmsPipelineOutputChannels) | |
| 461 #define cmsPipelineSetSaveAs8bitsFlag LCMS2MT_PREF(cmsPipelineSetSaveAs8bitsFlag) | |
| 462 #define _cmsPipelineSetOptimizationParameters LCMS2MT_PREF(_cmsPipelineSetOptimizationParameters) | |
| 463 #define cmsPipelineUnlinkStage LCMS2MT_PREF(cmsPipelineUnlinkStage) | |
| 464 #define _cmsMalloc LCMS2MT_PREF(_cmsMalloc) | |
| 465 #define _cmsMallocZero LCMS2MT_PREF(_cmsMallocZero) | |
| 466 #define _cmsMAT3eval LCMS2MT_PREF(_cmsMAT3eval) | |
| 467 #define _cmsMAT3identity LCMS2MT_PREF(_cmsMAT3identity) | |
| 468 #define _cmsMAT3inverse LCMS2MT_PREF(_cmsMAT3inverse) | |
| 469 #define _cmsMAT3isIdentity LCMS2MT_PREF(_cmsMAT3isIdentity) | |
| 470 #define _cmsMAT3per LCMS2MT_PREF(_cmsMAT3per) | |
| 471 #define _cmsMAT3solve LCMS2MT_PREF(_cmsMAT3solve) | |
| 472 #define cmsMD5computeID LCMS2MT_PREF(cmsMD5computeID) | |
| 473 #define cmsMLUalloc LCMS2MT_PREF(cmsMLUalloc) | |
| 474 #define cmsMLUdup LCMS2MT_PREF(cmsMLUdup) | |
| 475 #define cmsMLUfree LCMS2MT_PREF(cmsMLUfree) | |
| 476 #define cmsMLUgetASCII LCMS2MT_PREF(cmsMLUgetASCII) | |
| 477 #define cmsMLUgetTranslation LCMS2MT_PREF(cmsMLUgetTranslation) | |
| 478 #define cmsMLUgetWide LCMS2MT_PREF(cmsMLUgetWide) | |
| 479 #define cmsMLUgetUTF8 LCMS2MT_PREF(cmsMLUgetUTF8) | |
| 480 #define cmsMLUsetASCII LCMS2MT_PREF(cmsMLUsetASCII) | |
| 481 #define cmsMLUsetWide LCMS2MT_PREF(cmsMLUsetWide) | |
| 482 #define cmsMLUsetUTF8 LCMS2MT_PREF(cmsMLUsetUTF8) | |
| 483 #define cmsStageAllocCLut16bit LCMS2MT_PREF(cmsStageAllocCLut16bit) | |
| 484 #define cmsStageAllocCLut16bitGranular LCMS2MT_PREF(cmsStageAllocCLut16bitGranular) | |
| 485 #define cmsStageAllocCLutFloat LCMS2MT_PREF(cmsStageAllocCLutFloat) | |
| 486 #define cmsStageAllocCLutFloatGranular LCMS2MT_PREF(cmsStageAllocCLutFloatGranular) | |
| 487 #define cmsStageAllocToneCurves LCMS2MT_PREF(cmsStageAllocToneCurves) | |
| 488 #define cmsStageAllocIdentity LCMS2MT_PREF(cmsStageAllocIdentity) | |
| 489 #define cmsStageAllocMatrix LCMS2MT_PREF(cmsStageAllocMatrix) | |
| 490 #define _cmsStageAllocPlaceholder LCMS2MT_PREF(_cmsStageAllocPlaceholder) | |
| 491 #define cmsStageDup LCMS2MT_PREF(cmsStageDup) | |
| 492 #define cmsStageFree LCMS2MT_PREF(cmsStageFree) | |
| 493 #define cmsStageNext LCMS2MT_PREF(cmsStageNext) | |
| 494 #define cmsStageInputChannels LCMS2MT_PREF(cmsStageInputChannels) | |
| 495 #define cmsStageOutputChannels LCMS2MT_PREF(cmsStageOutputChannels) | |
| 496 #define cmsStageSampleCLut16bit LCMS2MT_PREF(cmsStageSampleCLut16bit) | |
| 497 #define cmsStageSampleCLutFloat LCMS2MT_PREF(cmsStageSampleCLutFloat) | |
| 498 #define cmsStageType LCMS2MT_PREF(cmsStageType) | |
| 499 #define cmsStageData LCMS2MT_PREF(cmsStageData) | |
| 500 #define cmsNamedColorCount LCMS2MT_PREF(cmsNamedColorCount) | |
| 501 #define cmsNamedColorIndex LCMS2MT_PREF(cmsNamedColorIndex) | |
| 502 #define cmsNamedColorInfo LCMS2MT_PREF(cmsNamedColorInfo) | |
| 503 #define cmsOpenIOhandlerFromFile LCMS2MT_PREF(cmsOpenIOhandlerFromFile) | |
| 504 #define cmsOpenIOhandlerFromMem LCMS2MT_PREF(cmsOpenIOhandlerFromMem) | |
| 505 #define cmsOpenIOhandlerFromNULL LCMS2MT_PREF(cmsOpenIOhandlerFromNULL) | |
| 506 #define cmsOpenIOhandlerFromStream LCMS2MT_PREF(cmsOpenIOhandlerFromStream) | |
| 507 #define cmsOpenProfileFromFile LCMS2MT_PREF(cmsOpenProfileFromFile) | |
| 508 #define cmsOpenProfileFromIOhandler LCMS2MT_PREF(cmsOpenProfileFromIOhandler) | |
| 509 #define cmsOpenProfileFromIOhandler2 LCMS2MT_PREF(cmsOpenProfileFromIOhandler2) | |
| 510 #define cmsOpenProfileFromMem LCMS2MT_PREF(cmsOpenProfileFromMem) | |
| 511 #define cmsOpenProfileFromStream LCMS2MT_PREF(cmsOpenProfileFromStream) | |
| 512 #define cmsCreateDeviceLinkFromCubeFile LCMS2MT_PREF(cmsCreateDeviceLinkFromCubeFile) | |
| 513 #define cmsPlugin LCMS2MT_PREF(cmsPlugin) | |
| 514 #define _cmsRead15Fixed16Number LCMS2MT_PREF(_cmsRead15Fixed16Number) | |
| 515 #define _cmsReadAlignment LCMS2MT_PREF(_cmsReadAlignment) | |
| 516 #define _cmsReadFloat32Number LCMS2MT_PREF(_cmsReadFloat32Number) | |
| 517 #define cmsReadRawTag LCMS2MT_PREF(cmsReadRawTag) | |
| 518 #define cmsReadTag LCMS2MT_PREF(cmsReadTag) | |
| 519 #define _cmsReadTypeBase LCMS2MT_PREF(_cmsReadTypeBase) | |
| 520 #define _cmsReadUInt16Array LCMS2MT_PREF(_cmsReadUInt16Array) | |
| 521 #define _cmsReadUInt16Number LCMS2MT_PREF(_cmsReadUInt16Number) | |
| 522 #define _cmsReadUInt32Number LCMS2MT_PREF(_cmsReadUInt32Number) | |
| 523 #define _cmsReadUInt64Number LCMS2MT_PREF(_cmsReadUInt64Number) | |
| 524 #define _cmsReadUInt8Number LCMS2MT_PREF(_cmsReadUInt8Number) | |
| 525 #define _cmsReadXYZNumber LCMS2MT_PREF(_cmsReadXYZNumber) | |
| 526 #define _cmsRealloc LCMS2MT_PREF(_cmsRealloc) | |
| 527 #define cmsReverseToneCurve LCMS2MT_PREF(cmsReverseToneCurve) | |
| 528 #define cmsReverseToneCurveEx LCMS2MT_PREF(cmsReverseToneCurveEx) | |
| 529 #define cmsSaveProfileToFile LCMS2MT_PREF(cmsSaveProfileToFile) | |
| 530 #define cmsSaveProfileToIOhandler LCMS2MT_PREF(cmsSaveProfileToIOhandler) | |
| 531 #define cmsSaveProfileToMem LCMS2MT_PREF(cmsSaveProfileToMem) | |
| 532 #define cmsSaveProfileToStream LCMS2MT_PREF(cmsSaveProfileToStream) | |
| 533 #define cmsSetAdaptationState LCMS2MT_PREF(cmsSetAdaptationState) | |
| 534 #define cmsSetAlarmCodes LCMS2MT_PREF(cmsSetAlarmCodes) | |
| 535 #define cmsSetColorSpace LCMS2MT_PREF(cmsSetColorSpace) | |
| 536 #define cmsSetDeviceClass LCMS2MT_PREF(cmsSetDeviceClass) | |
| 537 #define cmsSetEncodedICCversion LCMS2MT_PREF(cmsSetEncodedICCversion) | |
| 538 #define cmsSetHeaderAttributes LCMS2MT_PREF(cmsSetHeaderAttributes) | |
| 539 #define cmsSetHeaderFlags LCMS2MT_PREF(cmsSetHeaderFlags) | |
| 540 #define cmsSetHeaderManufacturer LCMS2MT_PREF(cmsSetHeaderManufacturer) | |
| 541 #define cmsSetHeaderModel LCMS2MT_PREF(cmsSetHeaderModel) | |
| 542 #define cmsSetHeaderProfileID LCMS2MT_PREF(cmsSetHeaderProfileID) | |
| 543 #define cmsSetHeaderRenderingIntent LCMS2MT_PREF(cmsSetHeaderRenderingIntent) | |
| 544 #define cmsSetLogErrorHandler LCMS2MT_PREF(cmsSetLogErrorHandler) | |
| 545 #define cmsSetPCS LCMS2MT_PREF(cmsSetPCS) | |
| 546 #define cmsSetProfileVersion LCMS2MT_PREF(cmsSetProfileVersion) | |
| 547 #define cmsSignalError LCMS2MT_PREF(cmsSignalError) | |
| 548 #define cmsSmoothToneCurve LCMS2MT_PREF(cmsSmoothToneCurve) | |
| 549 #define cmsstrcasecmp LCMS2MT_PREF(cmsstrcasecmp) | |
| 550 #define cmsTempFromWhitePoint LCMS2MT_PREF(cmsTempFromWhitePoint) | |
| 551 #define cmsTransform2DeviceLink LCMS2MT_PREF(cmsTransform2DeviceLink) | |
| 552 #define cmsUnregisterPlugins LCMS2MT_PREF(cmsUnregisterPlugins) | |
| 553 #define _cmsVEC3cross LCMS2MT_PREF(_cmsVEC3cross) | |
| 554 #define _cmsVEC3distance LCMS2MT_PREF(_cmsVEC3distance) | |
| 555 #define _cmsVEC3dot LCMS2MT_PREF(_cmsVEC3dot) | |
| 556 #define _cmsVEC3init LCMS2MT_PREF(_cmsVEC3init) | |
| 557 #define _cmsVEC3length LCMS2MT_PREF(_cmsVEC3length) | |
| 558 #define _cmsVEC3minus LCMS2MT_PREF(_cmsVEC3minus) | |
| 559 #define cmsWhitePointFromTemp LCMS2MT_PREF(cmsWhitePointFromTemp) | |
| 560 #define _cmsWrite15Fixed16Number LCMS2MT_PREF(_cmsWrite15Fixed16Number) | |
| 561 #define _cmsWriteAlignment LCMS2MT_PREF(_cmsWriteAlignment) | |
| 562 #define _cmsWriteFloat32Number LCMS2MT_PREF(_cmsWriteFloat32Number) | |
| 563 #define cmsWriteRawTag LCMS2MT_PREF(cmsWriteRawTag) | |
| 564 #define cmsWriteTag LCMS2MT_PREF(cmsWriteTag) | |
| 565 #define _cmsWriteTypeBase LCMS2MT_PREF(_cmsWriteTypeBase) | |
| 566 #define _cmsWriteUInt16Array LCMS2MT_PREF(_cmsWriteUInt16Array) | |
| 567 #define _cmsWriteUInt16Number LCMS2MT_PREF(_cmsWriteUInt16Number) | |
| 568 #define _cmsWriteUInt32Number LCMS2MT_PREF(_cmsWriteUInt32Number) | |
| 569 #define _cmsWriteUInt64Number LCMS2MT_PREF(_cmsWriteUInt64Number) | |
| 570 #define _cmsWriteUInt8Number LCMS2MT_PREF(_cmsWriteUInt8Number) | |
| 571 #define _cmsWriteXYZNumber LCMS2MT_PREF(_cmsWriteXYZNumber) | |
| 572 #define cmsxyY2XYZ LCMS2MT_PREF(cmsxyY2XYZ) | |
| 573 #define cmsXYZ2Lab LCMS2MT_PREF(cmsXYZ2Lab) | |
| 574 #define cmsXYZ2xyY LCMS2MT_PREF(cmsXYZ2xyY) | |
| 575 #define cmsXYZEncoded2Float LCMS2MT_PREF(cmsXYZEncoded2Float) | |
| 576 #define cmsSliceSpace16 LCMS2MT_PREF(cmsSliceSpace16) | |
| 577 #define cmsSliceSpaceFloat LCMS2MT_PREF(cmsSliceSpaceFloat) | |
| 578 #define cmsCloneTransformChangingFormats LCMS2MT_PREF(cmsCloneTransformChangingFormats) | |
| 579 #define cmsDictAlloc LCMS2MT_PREF(cmsDictAlloc) | |
| 580 #define cmsDictFree LCMS2MT_PREF(cmsDictFree) | |
| 581 #define cmsDictDup LCMS2MT_PREF(cmsDictDup) | |
| 582 #define cmsDictAddEntry LCMS2MT_PREF(cmsDictAddEntry) | |
| 583 #define cmsDictGetEntryList LCMS2MT_PREF(cmsDictGetEntryList) | |
| 584 #define cmsDictNextEntry LCMS2MT_PREF(cmsDictNextEntry) | |
| 585 #define _cmsGetTransformUserData LCMS2MT_PREF(_cmsGetTransformUserData) | |
| 586 #define _cmsSetTransformUserData LCMS2MT_PREF(_cmsSetTransformUserData) | |
| 587 #define _cmsGetTransformFormatters16 LCMS2MT_PREF(_cmsGetTransformFormatters16) | |
| 588 #define _cmsGetTransformFormattersFloat LCMS2MT_PREF(_cmsGetTransformFormattersFloat) | |
| 589 #define cmsGetHeaderCreator LCMS2MT_PREF(cmsGetHeaderCreator) | |
| 590 #define cmsPlugin LCMS2MT_PREF(cmsPlugin) | |
| 591 #define cmsGetTransformInputFormat LCMS2MT_PREF(cmsGetTransformInputFormat) | |
| 592 #define cmsGetTransformOutputFormat LCMS2MT_PREF(cmsGetTransformOutputFormat) | |
| 593 #define cmsCreateContext LCMS2MT_PREF(cmsCreateContext) | |
| 594 #define cmsDupContext LCMS2MT_PREF(cmsDupContext) | |
| 595 #define cmsDeleteContext LCMS2MT_PREF(cmsDeleteContext) | |
| 596 #define cmsGetContextUserData LCMS2MT_PREF(cmsGetContextUserData) | |
| 597 #define cmsUnregisterPlugins LCMS2MT_PREF(cmsUnregisterPlugins) | |
| 598 #define cmsSetAlarmCodes LCMS2MT_PREF(cmsSetAlarmCodes) | |
| 599 #define cmsGetAlarmCodes LCMS2MT_PREF(cmsGetAlarmCodes) | |
| 600 #define cmsSetAdaptationState LCMS2MT_PREF(cmsSetAdaptationState) | |
| 601 #define cmsSetLogErrorHandler LCMS2MT_PREF(cmsSetLogErrorHandler) | |
| 602 #define cmsGetSupportedIntents LCMS2MT_PREF(cmsGetSupportedIntents) | |
| 603 #define cmsMLUtranslationsCount LCMS2MT_PREF(cmsMLUtranslationsCount) | |
| 604 #define cmsMLUtranslationsCodes LCMS2MT_PREF(cmsMLUtranslationsCodes) | |
| 605 #define _cmsCreateMutex LCMS2MT_PREF(_cmsCreateMutex) | |
| 606 #define _cmsDestroyMutex LCMS2MT_PREF(_cmsDestroyMutex) | |
| 607 #define _cmsLockMutex LCMS2MT_PREF(_cmsLockMutex) | |
| 608 #define _cmsUnlockMutex LCMS2MT_PREF(_cmsUnlockMutex) | |
| 609 #define cmsGetProfileIOhandler LCMS2MT_PREF(cmsGetProfileIOhandler) | |
| 610 #define cmsGetEncodedCMMversion LCMS2MT_PREF(cmsGetEncodedCMMversion) | |
| 611 #define _cmsFloat2Half LCMS2MT_PREF(_cmsFloat2Half) | |
| 612 #define _cmsHalf2Float LCMS2MT_PREF(_cmsHalf2Float) | |
| 613 #define _cmsFreeInterpParams LCMS2MT_PREF(_cmsFreeInterpParams) | |
| 614 #define _cmsGetFormatter LCMS2MT_PREF(_cmsGetFormatter) | |
| 615 #define _cmsGetTransformFormatters16 LCMS2MT_PREF(_cmsGetTransformFormatters16) | |
| 616 #define _cmsGetTransformFormattersFloat LCMS2MT_PREF(_cmsGetTransformFormattersFloat) | |
| 617 #define _cmsQuantizeVal LCMS2MT_PREF(_cmsQuantizeVal) | |
| 618 #define _cmsReadDevicelinkLUT LCMS2MT_PREF(_cmsReadDevicelinkLUT) | |
| 619 #define _cmsReadInputLUT LCMS2MT_PREF(_cmsReadInputLUT) | |
| 620 #define _cmsReadOutputLUT LCMS2MT_PREF(_cmsReadOutputLUT) | |
| 621 #define _cmsStageAllocIdentityCLut LCMS2MT_PREF(_cmsStageAllocIdentityCLut) | |
| 622 #define _cmsStageAllocIdentityCurves LCMS2MT_PREF(_cmsStageAllocIdentityCurves) | |
| 623 #define _cmsStageAllocLab2XYZ LCMS2MT_PREF(_cmsStageAllocLab2XYZ) | |
| 624 #define _cmsStageAllocLabV2ToV4 LCMS2MT_PREF(_cmsStageAllocLabV2ToV4) | |
| 625 #define _cmsStageAllocLabV4ToV2 LCMS2MT_PREF(_cmsStageAllocLabV4ToV2) | |
| 626 #define _cmsStageAllocNamedColor LCMS2MT_PREF(_cmsStageAllocNamedColor) | |
| 627 #define _cmsStageAllocXYZ2Lab LCMS2MT_PREF(_cmsStageAllocXYZ2Lab) | |
| 628 #define cmsMD5add LCMS2MT_PREF(cmsMD5add) | |
| 629 #define cmsMD5alloc LCMS2MT_PREF(cmsMD5alloc) | |
| 630 #define cmsMD5finish LCMS2MT_PREF(cmsMD5finish) | |
| 631 #define _cmsComputeInterpParams LCMS2MT_PREF(_cmsComputeInterpParams) | |
| 632 #define cmsGetToneCurveSegment LCMS2MT_PREF(cmsGetToneCurveSegment) | |
| 633 #define cmsDetectRGBProfileGamma LCMS2MT_PREF(cmsDetectRGBProfileGamma) | |
| 634 #define _cmsOptimizePipeline LCMS2MT_PREF(_cmsOptimizePipeline) | |
| 635 #define _cmsReasonableGridpointsByColorspace LCMS2MT_PREF(_cmsReasonableGridpointsByColorspace) | |
| 636 #define _cmsGetTransformFlags LCMS2MT_PREF(_cmsGetTransformFlags) | |
| 637 #define _cmsGetTransformWorker LCMS2MT_PREF(_cmsGetTransformWorker) | |
| 638 #define _cmsGetTransformMaxWorkers LCMS2MT_PREF(_cmsGetTransformMaxWorkers) | |
| 639 #define _cmsGetTransformWorkerFlags LCMS2MT_PREF(_cmsGetTransformWorkerFlags) | |
| 640 | |
| 641 #define _cmsQuickFloor LCMS2MT_PREF(_cmsQuickFloor) | |
| 642 #define _cmsQuickFloorWord LCMS2MT_PREF(_cmsQuickFloorWord) | |
| 643 #define _cmsQuickSaturateWord LCMS2MT_PREF(_cmsQuickSaturateWord) | |
| 644 #define _cmsQuickSaturateByte LCMS2MT_PREF(_cmsQuickSaturateByte) | |
| 645 #define _cmsHandleExtraChannels LCMS2MT_PREF(_cmsHandleExtraChannels) | |
| 646 #define _cmsAllocIntentsPluginChunk LCMS2MT_PREF(_cmsAllocIntentsPluginChunk) | |
| 647 #define _cmsLinkProfiles LCMS2MT_PREF(_cmsLinkProfiles) | |
| 648 #define _cmsRegisterRenderingIntentPlugin LCMS2MT_PREF(_cmsRegisterRenderingIntentPlugin) | |
| 649 #define _cmsAllocLogErrorChunk LCMS2MT_PREF(_cmsAllocLogErrorChunk) | |
| 650 #define _cmsAllocMemPluginChunk LCMS2MT_PREF(_cmsAllocMemPluginChunk) | |
| 651 #define _cmsAllocMutexPluginChunk LCMS2MT_PREF(_cmsAllocMutexPluginChunk) | |
| 652 #define _cmsAllocParallelizationPluginChunk LCMS2MT_PREF(_cmsAllocParallelizationPluginChunk) | |
| 653 #define _cmsCreateSubAlloc LCMS2MT_PREF(_cmsCreateSubAlloc) | |
| 654 #define _cmsInstallAllocFunctions LCMS2MT_PREF(_cmsInstallAllocFunctions) | |
| 655 #define _cmsRegisterMemHandlerPlugin LCMS2MT_PREF(_cmsRegisterMemHandlerPlugin) | |
| 656 #define _cmsRegisterMutexPlugin LCMS2MT_PREF(_cmsRegisterMutexPlugin) | |
| 657 #define _cmsRegisterParallelizationPlugin LCMS2MT_PREF(_cmsRegisterParallelizationPlugin) | |
| 658 #define _cmsSubAlloc LCMS2MT_PREF(_cmsSubAlloc) | |
| 659 #define _cmsSubAllocDestroy LCMS2MT_PREF(_cmsSubAllocDestroy) | |
| 660 #define _cmsSubAllocDup LCMS2MT_PREF(_cmsSubAllocDup) | |
| 661 #define _cmsTagSignature2String LCMS2MT_PREF(_cmsTagSignature2String) | |
| 662 #define _cmsAllocCurvesPluginChunk LCMS2MT_PREF(_cmsAllocCurvesPluginChunk) | |
| 663 #define _cmsRegisterParametricCurvesPlugin LCMS2MT_PREF(_cmsRegisterParametricCurvesPlugin) | |
| 664 #define _cmsBuildKToneCurve LCMS2MT_PREF(_cmsBuildKToneCurve) | |
| 665 #define _cmsChain2Lab LCMS2MT_PREF(_cmsChain2Lab) | |
| 666 #define _cmsCreateGamutCheckPipeline LCMS2MT_PREF(_cmsCreateGamutCheckPipeline) | |
| 667 #define _cmsAllocInterpPluginChunk LCMS2MT_PREF(_cmsAllocInterpPluginChunk) | |
| 668 #define _cmsComputeInterpParamsEx LCMS2MT_PREF(_cmsComputeInterpParamsEx) | |
| 669 #define _cmsRegisterInterpPlugin LCMS2MT_PREF(_cmsRegisterInterpPlugin) | |
| 670 #define _cmsSetInterpolationRoutine LCMS2MT_PREF(_cmsSetInterpolationRoutine) | |
| 671 #define _cmsGetTagTrueType LCMS2MT_PREF(_cmsGetTagTrueType) | |
| 672 #define _cmsReadHeader LCMS2MT_PREF(_cmsReadHeader) | |
| 673 #define _cmsSearchTag LCMS2MT_PREF(_cmsSearchTag) | |
| 674 #define _cmsWriteHeader LCMS2MT_PREF(_cmsWriteHeader) | |
| 675 #define _cmsCompileProfileSequence LCMS2MT_PREF(_cmsCompileProfileSequence) | |
| 676 #define _cmsReadCHAD LCMS2MT_PREF(_cmsReadCHAD) | |
| 677 #define _cmsReadMediaWhitePoint LCMS2MT_PREF(_cmsReadMediaWhitePoint) | |
| 678 #define _cmsReadProfileSequence LCMS2MT_PREF(_cmsReadProfileSequence) | |
| 679 #define _cmsWriteProfileSequence LCMS2MT_PREF(_cmsWriteProfileSequence) | |
| 680 #define _cmsStageAllocLabPrelin LCMS2MT_PREF(_cmsStageAllocLabPrelin) | |
| 681 #define _cmsStageAllocLabV2ToV4curves LCMS2MT_PREF(_cmsStageAllocLabV2ToV4curves) | |
| 682 #define _cmsStageClipNegatives LCMS2MT_PREF(_cmsStageClipNegatives) | |
| 683 #define _cmsStageGetPtrToCurveSet LCMS2MT_PREF(_cmsStageGetPtrToCurveSet) | |
| 684 #define _cmsStageNormalizeFromLabFloat LCMS2MT_PREF(_cmsStageNormalizeFromLabFloat) | |
| 685 #define _cmsStageNormalizeFromXyzFloat LCMS2MT_PREF(_cmsStageNormalizeFromXyzFloat) | |
| 686 #define _cmsStageNormalizeToLabFloat LCMS2MT_PREF(_cmsStageNormalizeToLabFloat) | |
| 687 #define _cmsStageNormalizeToXyzFloat LCMS2MT_PREF(_cmsStageNormalizeToXyzFloat) | |
| 688 #define _cmsAllocOptimizationPluginChunk LCMS2MT_PREF(_cmsAllocOptimizationPluginChunk) | |
| 689 #define _cmsLutIsIdentity LCMS2MT_PREF(_cmsLutIsIdentity) | |
| 690 #define _cmsRegisterOptimizationPlugin LCMS2MT_PREF(_cmsRegisterOptimizationPlugin) | |
| 691 #define _cmsAllocFormattersPluginChunk LCMS2MT_PREF(_cmsAllocFormattersPluginChunk) | |
| 692 #define _cmsFormatterIs8bit LCMS2MT_PREF(_cmsFormatterIs8bit) | |
| 693 #define _cmsFormatterIsFloat LCMS2MT_PREF(_cmsFormatterIsFloat) | |
| 694 #define _cmsRegisterFormattersPlugin LCMS2MT_PREF(_cmsRegisterFormattersPlugin) | |
| 695 #define _cmsEndPointsBySpace LCMS2MT_PREF(_cmsEndPointsBySpace) | |
| 696 #define _cmsAdjustReferenceCount LCMS2MT_PREF(_cmsAdjustReferenceCount) | |
| 697 #define _cmsContextGetClientChunk LCMS2MT_PREF(_cmsContextGetClientChunk) | |
| 698 #define _cmsGetContext LCMS2MT_PREF(_cmsGetContext) | |
| 699 #define _cmsGetTime LCMS2MT_PREF(_cmsGetTime) | |
| 700 #define _cmsPluginMalloc LCMS2MT_PREF(_cmsPluginMalloc) | |
| 701 #define IsIdentity LCMS2MT_PREF(IsIdentity) | |
| 702 #define Type_MHC2_Dup LCMS2MT_PREF(Type_MHC2_Dup) | |
| 703 #define Type_VideoSignal_Dup LCMS2MT_PREF(Type_VideoSignal_Dup) | |
| 704 #define _cmsAllocMPETypePluginChunk LCMS2MT_PREF(_cmsAllocMPETypePluginChunk) | |
| 705 #define _cmsAllocTagPluginChunk LCMS2MT_PREF(_cmsAllocTagPluginChunk) | |
| 706 #define _cmsAllocTagTypePluginChunk LCMS2MT_PREF(_cmsAllocTagTypePluginChunk) | |
| 707 #define _cmsGetTagDescriptor LCMS2MT_PREF(_cmsGetTagDescriptor) | |
| 708 #define _cmsGetTagTypeHandler LCMS2MT_PREF(_cmsGetTagTypeHandler) | |
| 709 #define _cmsRegisterMultiProcessElementPlugin LCMS2MT_PREF(_cmsRegisterMultiProcessElementPlugin) | |
| 710 #define _cmsRegisterTagPlugin LCMS2MT_PREF(_cmsRegisterTagPlugin) | |
| 711 #define _cmsRegisterTagTypePlugin LCMS2MT_PREF(_cmsRegisterTagTypePlugin) | |
| 712 #define cmsCreate_OkLabProfile LCMS2MT_PREF(cmsCreate_OkLabProfile) | |
| 713 #define _cmsAdaptationMatrix LCMS2MT_PREF(_cmsAdaptationMatrix) | |
| 714 #define _cmsBuildRGB2XYZtransferMatrix LCMS2MT_PREF(_cmsBuildRGB2XYZtransferMatrix) | |
| 715 #define _cmsAllocAdaptationStateChunk LCMS2MT_PREF(_cmsAllocAdaptationStateChunk) | |
| 716 #define _cmsAllocAlarmCodesChunk LCMS2MT_PREF(_cmsAllocAlarmCodesChunk) | |
| 717 #define _cmsAllocTransformPluginChunk LCMS2MT_PREF(_cmsAllocTransformPluginChunk) | |
| 718 #define _cmsFindFormatter LCMS2MT_PREF(_cmsFindFormatter) | |
| 719 #define _cmsRegisterTransformPlugin LCMS2MT_PREF(_cmsRegisterTransformPlugin) | |
| 720 | |
| 721 #define _cmsIntentsPluginChunk LCMS2MT_PREF(_cmsIntentsPluginChunk) | |
| 722 #define _cmsLogErrorChunk LCMS2MT_PREF(_cmsLogErrorChunk) | |
| 723 #define _cmsMemPluginChunk LCMS2MT_PREF(_cmsMemPluginChunk) | |
| 724 #define _cmsMutexPluginChunk LCMS2MT_PREF(_cmsMutexPluginChunk) | |
| 725 #define _cmsParallelizationPluginChunk LCMS2MT_PREF(_cmsParallelizationPluginChunk) | |
| 726 #define _cmsCurvesPluginChunk LCMS2MT_PREF(_cmsCurvesPluginChunk) | |
| 727 #define _cmsInterpPluginChunk LCMS2MT_PREF(_cmsInterpPluginChunk) | |
| 728 #define _cmsOptimizationPluginChunk LCMS2MT_PREF(_cmsOptimizationPluginChunk) | |
| 729 #define _cmsFormattersPluginChunk LCMS2MT_PREF(_cmsFormattersPluginChunk) | |
| 730 #define _cmsMPETypePluginChunk LCMS2MT_PREF(_cmsMPETypePluginChunk) | |
| 731 #define _cmsTagPluginChunk LCMS2MT_PREF(_cmsTagPluginChunk) | |
| 732 #define _cmsTagTypePluginChunk LCMS2MT_PREF(_cmsTagTypePluginChunk) | |
| 733 #define _cmsAdaptationStateChunk LCMS2MT_PREF(_cmsAdaptationStateChunk) | |
| 734 #define _cmsAlarmCodesChunk LCMS2MT_PREF(_cmsAlarmCodesChunk) | |
| 735 #define _cmsTransformPluginChunk LCMS2MT_PREF(_cmsTransformPluginChunk) | |
| 736 | |
| 737 #endif | |
| 738 | |
| 739 | |
| 740 // Some common definitions | |
| 741 #define cmsMAX_PATH 256 | |
| 742 | |
| 743 #ifndef FALSE | |
| 744 # define FALSE 0 | |
| 745 #endif | |
| 746 #ifndef TRUE | |
| 747 # define TRUE 1 | |
| 748 #endif | |
| 749 | |
| 750 // D50 XYZ normalized to Y=1.0 | |
| 751 #define cmsD50X 0.9642 | |
| 752 #define cmsD50Y 1.0 | |
| 753 #define cmsD50Z 0.8249 | |
| 754 | |
| 755 // V4 perceptual black | |
| 756 #define cmsPERCEPTUAL_BLACK_X 0.00336 | |
| 757 #define cmsPERCEPTUAL_BLACK_Y 0.0034731 | |
| 758 #define cmsPERCEPTUAL_BLACK_Z 0.00287 | |
| 759 | |
| 760 // Definitions in ICC spec | |
| 761 #define cmsMagicNumber 0x61637370 // 'acsp' | |
| 762 #define lcmsSignature 0x6c636d73 // 'lcms' | |
| 763 | |
| 764 | |
| 765 // Base ICC type definitions | |
| 766 typedef enum { | |
| 767 cmsSigChromaticityType = 0x6368726D, // 'chrm' | |
| 768 cmsSigcicpType = 0x63696370, // 'cicp' | |
| 769 cmsSigColorantOrderType = 0x636C726F, // 'clro' | |
| 770 cmsSigColorantTableType = 0x636C7274, // 'clrt' | |
| 771 cmsSigCrdInfoType = 0x63726469, // 'crdi' | |
| 772 cmsSigCurveType = 0x63757276, // 'curv' | |
| 773 cmsSigDataType = 0x64617461, // 'data' | |
| 774 cmsSigDictType = 0x64696374, // 'dict' | |
| 775 cmsSigDateTimeType = 0x6474696D, // 'dtim' | |
| 776 cmsSigDeviceSettingsType = 0x64657673, // 'devs' | |
| 777 cmsSigLut16Type = 0x6d667432, // 'mft2' | |
| 778 cmsSigLut8Type = 0x6d667431, // 'mft1' | |
| 779 cmsSigLutAtoBType = 0x6d414220, // 'mAB ' | |
| 780 cmsSigLutBtoAType = 0x6d424120, // 'mBA ' | |
| 781 cmsSigMeasurementType = 0x6D656173, // 'meas' | |
| 782 cmsSigMultiLocalizedUnicodeType = 0x6D6C7563, // 'mluc' | |
| 783 cmsSigMultiProcessElementType = 0x6D706574, // 'mpet' | |
| 784 cmsSigNamedColorType = 0x6E636f6C, // 'ncol' -- DEPRECATED! | |
| 785 cmsSigNamedColor2Type = 0x6E636C32, // 'ncl2' | |
| 786 cmsSigParametricCurveType = 0x70617261, // 'para' | |
| 787 cmsSigProfileSequenceDescType = 0x70736571, // 'pseq' | |
| 788 cmsSigProfileSequenceIdType = 0x70736964, // 'psid' | |
| 789 cmsSigResponseCurveSet16Type = 0x72637332, // 'rcs2' | |
| 790 cmsSigS15Fixed16ArrayType = 0x73663332, // 'sf32' | |
| 791 cmsSigScreeningType = 0x7363726E, // 'scrn' | |
| 792 cmsSigSignatureType = 0x73696720, // 'sig ' | |
| 793 cmsSigTextType = 0x74657874, // 'text' | |
| 794 cmsSigTextDescriptionType = 0x64657363, // 'desc' | |
| 795 cmsSigU16Fixed16ArrayType = 0x75663332, // 'uf32' | |
| 796 cmsSigUcrBgType = 0x62666420, // 'bfd ' | |
| 797 cmsSigUInt16ArrayType = 0x75693136, // 'ui16' | |
| 798 cmsSigUInt32ArrayType = 0x75693332, // 'ui32' | |
| 799 cmsSigUInt64ArrayType = 0x75693634, // 'ui64' | |
| 800 cmsSigUInt8ArrayType = 0x75693038, // 'ui08' | |
| 801 cmsSigVcgtType = 0x76636774, // 'vcgt' | |
| 802 cmsSigViewingConditionsType = 0x76696577, // 'view' | |
| 803 cmsSigXYZType = 0x58595A20, // 'XYZ ' | |
| 804 cmsSigMHC2Type = 0x4D484332 // 'MHC2' | |
| 805 | |
| 806 | |
| 807 } cmsTagTypeSignature; | |
| 808 | |
| 809 // Base ICC tag definitions | |
| 810 typedef enum { | |
| 811 cmsSigAToB0Tag = 0x41324230, // 'A2B0' | |
| 812 cmsSigAToB1Tag = 0x41324231, // 'A2B1' | |
| 813 cmsSigAToB2Tag = 0x41324232, // 'A2B2' | |
| 814 cmsSigBlueColorantTag = 0x6258595A, // 'bXYZ' | |
| 815 cmsSigBlueMatrixColumnTag = 0x6258595A, // 'bXYZ' | |
| 816 cmsSigBlueTRCTag = 0x62545243, // 'bTRC' | |
| 817 cmsSigBToA0Tag = 0x42324130, // 'B2A0' | |
| 818 cmsSigBToA1Tag = 0x42324131, // 'B2A1' | |
| 819 cmsSigBToA2Tag = 0x42324132, // 'B2A2' | |
| 820 cmsSigCalibrationDateTimeTag = 0x63616C74, // 'calt' | |
| 821 cmsSigCharTargetTag = 0x74617267, // 'targ' | |
| 822 cmsSigChromaticAdaptationTag = 0x63686164, // 'chad' | |
| 823 cmsSigChromaticityTag = 0x6368726D, // 'chrm' | |
| 824 cmsSigColorantOrderTag = 0x636C726F, // 'clro' | |
| 825 cmsSigColorantTableTag = 0x636C7274, // 'clrt' | |
| 826 cmsSigColorantTableOutTag = 0x636C6F74, // 'clot' | |
| 827 cmsSigColorimetricIntentImageStateTag = 0x63696973, // 'ciis' | |
| 828 cmsSigCopyrightTag = 0x63707274, // 'cprt' | |
| 829 cmsSigCrdInfoTag = 0x63726469, // 'crdi' | |
| 830 cmsSigDataTag = 0x64617461, // 'data' | |
| 831 cmsSigDateTimeTag = 0x6474696D, // 'dtim' | |
| 832 cmsSigDeviceMfgDescTag = 0x646D6E64, // 'dmnd' | |
| 833 cmsSigDeviceModelDescTag = 0x646D6464, // 'dmdd' | |
| 834 cmsSigDeviceSettingsTag = 0x64657673, // 'devs' | |
| 835 cmsSigDToB0Tag = 0x44324230, // 'D2B0' | |
| 836 cmsSigDToB1Tag = 0x44324231, // 'D2B1' | |
| 837 cmsSigDToB2Tag = 0x44324232, // 'D2B2' | |
| 838 cmsSigDToB3Tag = 0x44324233, // 'D2B3' | |
| 839 cmsSigBToD0Tag = 0x42324430, // 'B2D0' | |
| 840 cmsSigBToD1Tag = 0x42324431, // 'B2D1' | |
| 841 cmsSigBToD2Tag = 0x42324432, // 'B2D2' | |
| 842 cmsSigBToD3Tag = 0x42324433, // 'B2D3' | |
| 843 cmsSigGamutTag = 0x67616D74, // 'gamt' | |
| 844 cmsSigGrayTRCTag = 0x6b545243, // 'kTRC' | |
| 845 cmsSigGreenColorantTag = 0x6758595A, // 'gXYZ' | |
| 846 cmsSigGreenMatrixColumnTag = 0x6758595A, // 'gXYZ' | |
| 847 cmsSigGreenTRCTag = 0x67545243, // 'gTRC' | |
| 848 cmsSigLuminanceTag = 0x6C756d69, // 'lumi' | |
| 849 cmsSigMeasurementTag = 0x6D656173, // 'meas' | |
| 850 cmsSigMediaBlackPointTag = 0x626B7074, // 'bkpt' | |
| 851 cmsSigMediaWhitePointTag = 0x77747074, // 'wtpt' | |
| 852 cmsSigNamedColorTag = 0x6E636f6C, // 'ncol' // Deprecated by the ICC | |
| 853 cmsSigNamedColor2Tag = 0x6E636C32, // 'ncl2' | |
| 854 cmsSigOutputResponseTag = 0x72657370, // 'resp' | |
| 855 cmsSigPerceptualRenderingIntentGamutTag = 0x72696730, // 'rig0' | |
| 856 cmsSigPreview0Tag = 0x70726530, // 'pre0' | |
| 857 cmsSigPreview1Tag = 0x70726531, // 'pre1' | |
| 858 cmsSigPreview2Tag = 0x70726532, // 'pre2' | |
| 859 cmsSigProfileDescriptionTag = 0x64657363, // 'desc' | |
| 860 cmsSigProfileDescriptionMLTag = 0x6473636d, // 'dscm' | |
| 861 cmsSigProfileSequenceDescTag = 0x70736571, // 'pseq' | |
| 862 cmsSigProfileSequenceIdTag = 0x70736964, // 'psid' | |
| 863 cmsSigPs2CRD0Tag = 0x70736430, // 'psd0' | |
| 864 cmsSigPs2CRD1Tag = 0x70736431, // 'psd1' | |
| 865 cmsSigPs2CRD2Tag = 0x70736432, // 'psd2' | |
| 866 cmsSigPs2CRD3Tag = 0x70736433, // 'psd3' | |
| 867 cmsSigPs2CSATag = 0x70733273, // 'ps2s' | |
| 868 cmsSigPs2RenderingIntentTag = 0x70733269, // 'ps2i' | |
| 869 cmsSigRedColorantTag = 0x7258595A, // 'rXYZ' | |
| 870 cmsSigRedMatrixColumnTag = 0x7258595A, // 'rXYZ' | |
| 871 cmsSigRedTRCTag = 0x72545243, // 'rTRC' | |
| 872 cmsSigSaturationRenderingIntentGamutTag = 0x72696732, // 'rig2' | |
| 873 cmsSigScreeningDescTag = 0x73637264, // 'scrd' | |
| 874 cmsSigScreeningTag = 0x7363726E, // 'scrn' | |
| 875 cmsSigTechnologyTag = 0x74656368, // 'tech' | |
| 876 cmsSigUcrBgTag = 0x62666420, // 'bfd ' | |
| 877 cmsSigViewingCondDescTag = 0x76756564, // 'vued' | |
| 878 cmsSigViewingConditionsTag = 0x76696577, // 'view' | |
| 879 cmsSigVcgtTag = 0x76636774, // 'vcgt' | |
| 880 cmsSigMetaTag = 0x6D657461, // 'meta' | |
| 881 cmsSigcicpTag = 0x63696370, // 'cicp' | |
| 882 cmsSigArgyllArtsTag = 0x61727473, // 'arts' | |
| 883 cmsSigMHC2Tag = 0x4D484332 // 'MHC2' | |
| 884 | |
| 885 } cmsTagSignature; | |
| 886 | |
| 887 | |
| 888 // ICC Technology tag | |
| 889 typedef enum { | |
| 890 cmsSigDigitalCamera = 0x6463616D, // 'dcam' | |
| 891 cmsSigFilmScanner = 0x6673636E, // 'fscn' | |
| 892 cmsSigReflectiveScanner = 0x7273636E, // 'rscn' | |
| 893 cmsSigInkJetPrinter = 0x696A6574, // 'ijet' | |
| 894 cmsSigThermalWaxPrinter = 0x74776178, // 'twax' | |
| 895 cmsSigElectrophotographicPrinter = 0x6570686F, // 'epho' | |
| 896 cmsSigElectrostaticPrinter = 0x65737461, // 'esta' | |
| 897 cmsSigDyeSublimationPrinter = 0x64737562, // 'dsub' | |
| 898 cmsSigPhotographicPaperPrinter = 0x7270686F, // 'rpho' | |
| 899 cmsSigFilmWriter = 0x6670726E, // 'fprn' | |
| 900 cmsSigVideoMonitor = 0x7669646D, // 'vidm' | |
| 901 cmsSigVideoCamera = 0x76696463, // 'vidc' | |
| 902 cmsSigProjectionTelevision = 0x706A7476, // 'pjtv' | |
| 903 cmsSigCRTDisplay = 0x43525420, // 'CRT ' | |
| 904 cmsSigPMDisplay = 0x504D4420, // 'PMD ' | |
| 905 cmsSigAMDisplay = 0x414D4420, // 'AMD ' | |
| 906 cmsSigPhotoCD = 0x4B504344, // 'KPCD' | |
| 907 cmsSigPhotoImageSetter = 0x696D6773, // 'imgs' | |
| 908 cmsSigGravure = 0x67726176, // 'grav' | |
| 909 cmsSigOffsetLithography = 0x6F666673, // 'offs' | |
| 910 cmsSigSilkscreen = 0x73696C6B, // 'silk' | |
| 911 cmsSigFlexography = 0x666C6578, // 'flex' | |
| 912 cmsSigMotionPictureFilmScanner = 0x6D706673, // 'mpfs' | |
| 913 cmsSigMotionPictureFilmRecorder = 0x6D706672, // 'mpfr' | |
| 914 cmsSigDigitalMotionPictureCamera = 0x646D7063, // 'dmpc' | |
| 915 cmsSigDigitalCinemaProjector = 0x64636A70 // 'dcpj' | |
| 916 | |
| 917 } cmsTechnologySignature; | |
| 918 | |
| 919 | |
| 920 // ICC Color spaces | |
| 921 typedef enum { | |
| 922 cmsSigXYZData = 0x58595A20, // 'XYZ ' | |
| 923 cmsSigLabData = 0x4C616220, // 'Lab ' | |
| 924 cmsSigLuvData = 0x4C757620, // 'Luv ' | |
| 925 cmsSigYCbCrData = 0x59436272, // 'YCbr' | |
| 926 cmsSigYxyData = 0x59787920, // 'Yxy ' | |
| 927 cmsSigRgbData = 0x52474220, // 'RGB ' | |
| 928 cmsSigGrayData = 0x47524159, // 'GRAY' | |
| 929 cmsSigHsvData = 0x48535620, // 'HSV ' | |
| 930 cmsSigHlsData = 0x484C5320, // 'HLS ' | |
| 931 cmsSigCmykData = 0x434D594B, // 'CMYK' | |
| 932 cmsSigCmyData = 0x434D5920, // 'CMY ' | |
| 933 cmsSigMCH1Data = 0x4D434831, // 'MCH1' | |
| 934 cmsSigMCH2Data = 0x4D434832, // 'MCH2' | |
| 935 cmsSigMCH3Data = 0x4D434833, // 'MCH3' | |
| 936 cmsSigMCH4Data = 0x4D434834, // 'MCH4' | |
| 937 cmsSigMCH5Data = 0x4D434835, // 'MCH5' | |
| 938 cmsSigMCH6Data = 0x4D434836, // 'MCH6' | |
| 939 cmsSigMCH7Data = 0x4D434837, // 'MCH7' | |
| 940 cmsSigMCH8Data = 0x4D434838, // 'MCH8' | |
| 941 cmsSigMCH9Data = 0x4D434839, // 'MCH9' | |
| 942 cmsSigMCHAData = 0x4D434841, // 'MCHA' | |
| 943 cmsSigMCHBData = 0x4D434842, // 'MCHB' | |
| 944 cmsSigMCHCData = 0x4D434843, // 'MCHC' | |
| 945 cmsSigMCHDData = 0x4D434844, // 'MCHD' | |
| 946 cmsSigMCHEData = 0x4D434845, // 'MCHE' | |
| 947 cmsSigMCHFData = 0x4D434846, // 'MCHF' | |
| 948 cmsSigNamedData = 0x6e6d636c, // 'nmcl' | |
| 949 cmsSig1colorData = 0x31434C52, // '1CLR' | |
| 950 cmsSig2colorData = 0x32434C52, // '2CLR' | |
| 951 cmsSig3colorData = 0x33434C52, // '3CLR' | |
| 952 cmsSig4colorData = 0x34434C52, // '4CLR' | |
| 953 cmsSig5colorData = 0x35434C52, // '5CLR' | |
| 954 cmsSig6colorData = 0x36434C52, // '6CLR' | |
| 955 cmsSig7colorData = 0x37434C52, // '7CLR' | |
| 956 cmsSig8colorData = 0x38434C52, // '8CLR' | |
| 957 cmsSig9colorData = 0x39434C52, // '9CLR' | |
| 958 cmsSig10colorData = 0x41434C52, // 'ACLR' | |
| 959 cmsSig11colorData = 0x42434C52, // 'BCLR' | |
| 960 cmsSig12colorData = 0x43434C52, // 'CCLR' | |
| 961 cmsSig13colorData = 0x44434C52, // 'DCLR' | |
| 962 cmsSig14colorData = 0x45434C52, // 'ECLR' | |
| 963 cmsSig15colorData = 0x46434C52, // 'FCLR' | |
| 964 cmsSigLuvKData = 0x4C75764B // 'LuvK' | |
| 965 | |
| 966 } cmsColorSpaceSignature; | |
| 967 | |
| 968 // ICC Profile Class | |
| 969 typedef enum { | |
| 970 cmsSigInputClass = 0x73636E72, // 'scnr' | |
| 971 cmsSigDisplayClass = 0x6D6E7472, // 'mntr' | |
| 972 cmsSigOutputClass = 0x70727472, // 'prtr' | |
| 973 cmsSigLinkClass = 0x6C696E6B, // 'link' | |
| 974 cmsSigAbstractClass = 0x61627374, // 'abst' | |
| 975 cmsSigColorSpaceClass = 0x73706163, // 'spac' | |
| 976 cmsSigNamedColorClass = 0x6e6d636c // 'nmcl' | |
| 977 | |
| 978 } cmsProfileClassSignature; | |
| 979 | |
| 980 // ICC Platforms | |
| 981 typedef enum { | |
| 982 cmsSigMacintosh = 0x4150504C, // 'APPL' | |
| 983 cmsSigMicrosoft = 0x4D534654, // 'MSFT' | |
| 984 cmsSigSolaris = 0x53554E57, // 'SUNW' | |
| 985 cmsSigSGI = 0x53474920, // 'SGI ' | |
| 986 cmsSigTaligent = 0x54474E54, // 'TGNT' | |
| 987 cmsSigUnices = 0x2A6E6978 // '*nix' // From argyll -- Not official | |
| 988 | |
| 989 } cmsPlatformSignature; | |
| 990 | |
| 991 // Reference gamut | |
| 992 #define cmsSigPerceptualReferenceMediumGamut 0x70726d67 //'prmg' | |
| 993 | |
| 994 // For cmsSigColorimetricIntentImageStateTag | |
| 995 #define cmsSigSceneColorimetryEstimates 0x73636F65 //'scoe' | |
| 996 #define cmsSigSceneAppearanceEstimates 0x73617065 //'sape' | |
| 997 #define cmsSigFocalPlaneColorimetryEstimates 0x66706365 //'fpce' | |
| 998 #define cmsSigReflectionHardcopyOriginalColorimetry 0x72686F63 //'rhoc' | |
| 999 #define cmsSigReflectionPrintOutputColorimetry 0x72706F63 //'rpoc' | |
| 1000 | |
| 1001 // Multi process elements types | |
| 1002 typedef enum { | |
| 1003 cmsSigCurveSetElemType = 0x63767374, //'cvst' | |
| 1004 cmsSigMatrixElemType = 0x6D617466, //'matf' | |
| 1005 cmsSigCLutElemType = 0x636C7574, //'clut' | |
| 1006 | |
| 1007 cmsSigBAcsElemType = 0x62414353, // 'bACS' | |
| 1008 cmsSigEAcsElemType = 0x65414353, // 'eACS' | |
| 1009 | |
| 1010 // Custom from here, not in the ICC Spec | |
| 1011 cmsSigXYZ2LabElemType = 0x6C327820, // 'l2x ' | |
| 1012 cmsSigLab2XYZElemType = 0x78326C20, // 'x2l ' | |
| 1013 cmsSigNamedColorElemType = 0x6E636C20, // 'ncl ' | |
| 1014 cmsSigLabV2toV4 = 0x32203420, // '2 4 ' | |
| 1015 cmsSigLabV4toV2 = 0x34203220, // '4 2 ' | |
| 1016 | |
| 1017 // Identities | |
| 1018 cmsSigIdentityElemType = 0x69646E20, // 'idn ' | |
| 1019 | |
| 1020 // Float to floatPCS | |
| 1021 cmsSigLab2FloatPCS = 0x64326C20, // 'd2l ' | |
| 1022 cmsSigFloatPCS2Lab = 0x6C326420, // 'l2d ' | |
| 1023 cmsSigXYZ2FloatPCS = 0x64327820, // 'd2x ' | |
| 1024 cmsSigFloatPCS2XYZ = 0x78326420, // 'x2d ' | |
| 1025 cmsSigClipNegativesElemType = 0x636c7020 // 'clp ' | |
| 1026 | |
| 1027 } cmsStageSignature; | |
| 1028 | |
| 1029 // Types of CurveElements | |
| 1030 typedef enum { | |
| 1031 | |
| 1032 cmsSigFormulaCurveSeg = 0x70617266, // 'parf' | |
| 1033 cmsSigSampledCurveSeg = 0x73616D66, // 'samf' | |
| 1034 cmsSigSegmentedCurve = 0x63757266 // 'curf' | |
| 1035 | |
| 1036 } cmsCurveSegSignature; | |
| 1037 | |
| 1038 // Used in ResponseCurveType | |
| 1039 #define cmsSigStatusA 0x53746141 //'StaA' | |
| 1040 #define cmsSigStatusE 0x53746145 //'StaE' | |
| 1041 #define cmsSigStatusI 0x53746149 //'StaI' | |
| 1042 #define cmsSigStatusT 0x53746154 //'StaT' | |
| 1043 #define cmsSigStatusM 0x5374614D //'StaM' | |
| 1044 #define cmsSigDN 0x444E2020 //'DN ' | |
| 1045 #define cmsSigDNP 0x444E2050 //'DN P' | |
| 1046 #define cmsSigDNN 0x444E4E20 //'DNN ' | |
| 1047 #define cmsSigDNNP 0x444E4E50 //'DNNP' | |
| 1048 | |
| 1049 // Device attributes, currently defined values correspond to the low 4 bytes | |
| 1050 // of the 8 byte attribute quantity | |
| 1051 #define cmsReflective 0 | |
| 1052 #define cmsTransparency 1 | |
| 1053 #define cmsGlossy 0 | |
| 1054 #define cmsMatte 2 | |
| 1055 | |
| 1056 // Common structures in ICC tags | |
| 1057 typedef struct { | |
| 1058 cmsUInt32Number len; | |
| 1059 cmsUInt32Number flag; | |
| 1060 cmsUInt8Number data[1]; | |
| 1061 | |
| 1062 } cmsICCData; | |
| 1063 | |
| 1064 // ICC date time | |
| 1065 typedef struct { | |
| 1066 cmsUInt16Number year; | |
| 1067 cmsUInt16Number month; | |
| 1068 cmsUInt16Number day; | |
| 1069 cmsUInt16Number hours; | |
| 1070 cmsUInt16Number minutes; | |
| 1071 cmsUInt16Number seconds; | |
| 1072 | |
| 1073 } cmsDateTimeNumber; | |
| 1074 | |
| 1075 // ICC XYZ | |
| 1076 typedef struct { | |
| 1077 cmsS15Fixed16Number X; | |
| 1078 cmsS15Fixed16Number Y; | |
| 1079 cmsS15Fixed16Number Z; | |
| 1080 | |
| 1081 } cmsEncodedXYZNumber; | |
| 1082 | |
| 1083 | |
| 1084 // Profile ID as computed by MD5 algorithm | |
| 1085 typedef union { | |
| 1086 cmsUInt8Number ID8[16]; | |
| 1087 cmsUInt16Number ID16[8]; | |
| 1088 cmsUInt32Number ID32[4]; | |
| 1089 | |
| 1090 } cmsProfileID; | |
| 1091 | |
| 1092 | |
| 1093 // ---------------------------------------------------------------------------------------------- | |
| 1094 // ICC profile internal base types. Strictly, shouldn't be declared in this header, but maybe | |
| 1095 // somebody want to use this info for accessing profile header directly, so here it is. | |
| 1096 | |
| 1097 // Profile header -- it is 32-bit aligned, so no issues are expected on alignment | |
| 1098 typedef struct { | |
| 1099 cmsUInt32Number size; // Profile size in bytes | |
| 1100 cmsSignature cmmId; // CMM for this profile | |
| 1101 cmsUInt32Number version; // Format version number | |
| 1102 cmsProfileClassSignature deviceClass; // Type of profile | |
| 1103 cmsColorSpaceSignature colorSpace; // Color space of data | |
| 1104 cmsColorSpaceSignature pcs; // PCS, XYZ or Lab only | |
| 1105 cmsDateTimeNumber date; // Date profile was created | |
| 1106 cmsSignature magic; // Magic Number to identify an ICC profile | |
| 1107 cmsPlatformSignature platform; // Primary Platform | |
| 1108 cmsUInt32Number flags; // Various bit settings | |
| 1109 cmsSignature manufacturer; // Device manufacturer | |
| 1110 cmsUInt32Number model; // Device model number | |
| 1111 cmsUInt64Number attributes; // Device attributes | |
| 1112 cmsUInt32Number renderingIntent;// Rendering intent | |
| 1113 cmsEncodedXYZNumber illuminant; // Profile illuminant | |
| 1114 cmsSignature creator; // Profile creator | |
| 1115 cmsProfileID profileID; // Profile ID using MD5 | |
| 1116 cmsInt8Number reserved[28]; // Reserved for future use | |
| 1117 | |
| 1118 } cmsICCHeader; | |
| 1119 | |
| 1120 // ICC base tag | |
| 1121 typedef struct { | |
| 1122 cmsTagTypeSignature sig; | |
| 1123 cmsInt8Number reserved[4]; | |
| 1124 | |
| 1125 } cmsTagBase; | |
| 1126 | |
| 1127 // A tag entry in directory | |
| 1128 typedef struct { | |
| 1129 cmsTagSignature sig; // The tag signature | |
| 1130 cmsUInt32Number offset; // Start of tag | |
| 1131 cmsUInt32Number size; // Size in bytes | |
| 1132 | |
| 1133 } cmsTagEntry; | |
| 1134 | |
| 1135 // ---------------------------------------------------------------------------------------------- | |
| 1136 | |
| 1137 // Little CMS specific typedefs | |
| 1138 | |
| 1139 typedef void* cmsHANDLE ; // Generic handle | |
| 1140 typedef void* cmsHPROFILE; // Opaque typedefs to hide internals | |
| 1141 typedef void* cmsHTRANSFORM; | |
| 1142 | |
| 1143 #define cmsMAXCHANNELS 16 // Maximum number of channels in ICC profiles | |
| 1144 #define cmsMAXEXTRACHANNELS (63+cmsMAXCHANNELS) // Maximum number of channels + 'extra' channels supported in links | |
| 1145 | |
| 1146 // Format of pixel is defined by one cmsUInt32Number, using bit fields as follows | |
| 1147 // | |
| 1148 // 222 2222 1111 1111 11 | |
| 1149 // 654 3210 9876 5432 1098 7654 3210 | |
| 1150 // MEE EEEE EAOT TTTT YFPX SCCC CBBB | |
| 1151 // | |
| 1152 // E: Extra samples | |
| 1153 // M: Premultiplied alpha (only works when extra samples is 1) | |
| 1154 // A: Floating point -- With this flag we can differentiate 16 bits as float and as int | |
| 1155 // O: Optimized -- previous optimization already returns the final 8-bit value | |
| 1156 // T: Pixeltype | |
| 1157 // F: Flavor 0=MinIsBlack(Chocolate) 1=MinIsWhite(Vanilla) | |
| 1158 // P: Planar? 0=Chunky, 1=Planar | |
| 1159 // X: swap 16 bps endianness? | |
| 1160 // S: Do swap? ie, BGR, KYMC | |
| 1161 // C: Channels (Samples per pixel) | |
| 1162 // B: bytes per sample | |
| 1163 // Y: Swap first - changes ABGR to BGRA and KCMY to CMYK | |
| 1164 | |
| 1165 #define PREMUL_SH(m) ((m) << 26) | |
| 1166 #define EXTRA_SH(e) ((e) << 19) | |
| 1167 #define FLOAT_SH(a) ((a) << 18) | |
| 1168 #define OPTIMIZED_SH(s) ((s) << 17) | |
| 1169 #define COLORSPACE_SH(s) ((s) << 12) | |
| 1170 #define SWAPFIRST_SH(s) ((s) << 11) | |
| 1171 #define FLAVOR_SH(s) ((s) << 10) | |
| 1172 #define PLANAR_SH(p) ((p) << 9) | |
| 1173 #define ENDIAN16_SH(e) ((e) << 8) | |
| 1174 #define DOSWAP_SH(e) ((e) << 7) | |
| 1175 #define CHANNELS_SH(c) ((c) << 3) | |
| 1176 #define BYTES_SH(b) (b) | |
| 1177 | |
| 1178 // These macros unpack format specifiers into integers | |
| 1179 #define T_PREMUL(m) (((m)>>26)&1) | |
| 1180 #define T_EXTRA(e) (((e)>>19)&63) | |
| 1181 #define T_FLOAT(a) (((a)>>18)&1) | |
| 1182 #define T_OPTIMIZED(o) (((o)>>17)&1) | |
| 1183 #define T_COLORSPACE(s) (((s)>>12)&31) | |
| 1184 #define T_SWAPFIRST(s) (((s)>>11)&1) | |
| 1185 #define T_FLAVOR(s) (((s)>>10)&1) | |
| 1186 #define T_PLANAR(p) (((p)>>9)&1) | |
| 1187 #define T_ENDIAN16(e) (((e)>>8)&1) | |
| 1188 #define T_DOSWAP(e) (((e)>>7)&1) | |
| 1189 #define T_CHANNELS(c) (((c)>>3)&15) | |
| 1190 #define T_BYTES(b) ((b)&7) | |
| 1191 | |
| 1192 | |
| 1193 // Pixel types | |
| 1194 #define PT_ANY 0 // Don't check colorspace | |
| 1195 // 1 & 2 are reserved | |
| 1196 #define PT_GRAY 3 | |
| 1197 #define PT_RGB 4 | |
| 1198 #define PT_CMY 5 | |
| 1199 #define PT_CMYK 6 | |
| 1200 #define PT_YCbCr 7 | |
| 1201 #define PT_YUV 8 // Lu'v' | |
| 1202 #define PT_XYZ 9 | |
| 1203 #define PT_Lab 10 | |
| 1204 #define PT_YUVK 11 // Lu'v'K | |
| 1205 #define PT_HSV 12 | |
| 1206 #define PT_HLS 13 | |
| 1207 #define PT_Yxy 14 | |
| 1208 #define PT_MCH1 15 | |
| 1209 #define PT_MCH2 16 | |
| 1210 #define PT_MCH3 17 | |
| 1211 #define PT_MCH4 18 | |
| 1212 #define PT_MCH5 19 | |
| 1213 #define PT_MCH6 20 | |
| 1214 #define PT_MCH7 21 | |
| 1215 #define PT_MCH8 22 | |
| 1216 #define PT_MCH9 23 | |
| 1217 #define PT_MCH10 24 | |
| 1218 #define PT_MCH11 25 | |
| 1219 #define PT_MCH12 26 | |
| 1220 #define PT_MCH13 27 | |
| 1221 #define PT_MCH14 28 | |
| 1222 #define PT_MCH15 29 | |
| 1223 #define PT_LabV2 30 // Identical to PT_Lab, but using the V2 old encoding | |
| 1224 | |
| 1225 // Some (not all!) representations | |
| 1226 | |
| 1227 #ifndef TYPE_RGB_8 // TYPE_RGB_8 is a very common identifier, so don't include ours | |
| 1228 // if user has it already defined. | |
| 1229 | |
| 1230 #define TYPE_GRAY_8 (COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(1)) | |
| 1231 #define TYPE_GRAY_8_REV (COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(1)|FLAVOR_SH(1)) | |
| 1232 #define TYPE_GRAY_16 (COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(2)) | |
| 1233 #define TYPE_GRAY_16_REV (COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(2)|FLAVOR_SH(1)) | |
| 1234 #define TYPE_GRAY_16_SE (COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1235 #define TYPE_GRAYA_8 (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(1)) | |
| 1236 #define TYPE_GRAYA_8_PREMUL (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(1)|PREMUL_SH(1)) | |
| 1237 #define TYPE_GRAYA_16 (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(2)) | |
| 1238 #define TYPE_GRAYA_16_PREMUL (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(2)|PREMUL_SH(1)) | |
| 1239 #define TYPE_GRAYA_16_SE (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1240 #define TYPE_GRAYA_8_PLANAR (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(1)|PLANAR_SH(1)) | |
| 1241 #define TYPE_GRAYA_16_PLANAR (COLORSPACE_SH(PT_GRAY)|EXTRA_SH(1)|CHANNELS_SH(1)|BYTES_SH(2)|PLANAR_SH(1)) | |
| 1242 | |
| 1243 #define TYPE_RGB_8 (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(1)) | |
| 1244 #define TYPE_RGB_8_PLANAR (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(1)|PLANAR_SH(1)) | |
| 1245 #define TYPE_BGR_8 (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)) | |
| 1246 #define TYPE_BGR_8_PLANAR (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)|PLANAR_SH(1)) | |
| 1247 #define TYPE_RGB_16 (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)) | |
| 1248 #define TYPE_RGB_16_PLANAR (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1)) | |
| 1249 #define TYPE_RGB_16_SE (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1250 #define TYPE_BGR_16 (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)) | |
| 1251 #define TYPE_BGR_16_PLANAR (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|PLANAR_SH(1)) | |
| 1252 #define TYPE_BGR_16_SE (COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1)) | |
| 1253 | |
| 1254 #define TYPE_RGBA_8 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)) | |
| 1255 #define TYPE_RGBA_8_PREMUL (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|PREMUL_SH(1)) | |
| 1256 #define TYPE_RGBA_8_PLANAR (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|PLANAR_SH(1)) | |
| 1257 #define TYPE_RGBA_16 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)) | |
| 1258 #define TYPE_RGBA_16_PREMUL (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|PREMUL_SH(1)) | |
| 1259 #define TYPE_RGBA_16_PLANAR (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1)) | |
| 1260 #define TYPE_RGBA_16_SE (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1261 | |
| 1262 #define TYPE_ARGB_8 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|SWAPFIRST_SH(1)) | |
| 1263 #define TYPE_ARGB_8_PREMUL (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|SWAPFIRST_SH(1)|PREMUL_SH(1)) | |
| 1264 #define TYPE_ARGB_8_PLANAR (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|SWAPFIRST_SH(1)|PLANAR_SH(1)) | |
| 1265 #define TYPE_ARGB_16 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|SWAPFIRST_SH(1)) | |
| 1266 #define TYPE_ARGB_16_PREMUL (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|SWAPFIRST_SH(1)|PREMUL_SH(1)) | |
| 1267 | |
| 1268 #define TYPE_ABGR_8 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)) | |
| 1269 #define TYPE_ABGR_8_PREMUL (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)|PREMUL_SH(1)) | |
| 1270 #define TYPE_ABGR_8_PLANAR (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)|PLANAR_SH(1)) | |
| 1271 #define TYPE_ABGR_16 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)) | |
| 1272 #define TYPE_ABGR_16_PREMUL (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|PREMUL_SH(1)) | |
| 1273 #define TYPE_ABGR_16_PLANAR (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|PLANAR_SH(1)) | |
| 1274 #define TYPE_ABGR_16_SE (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1)) | |
| 1275 | |
| 1276 #define TYPE_BGRA_8 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)|SWAPFIRST_SH(1)) | |
| 1277 #define TYPE_BGRA_8_PREMUL (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)|SWAPFIRST_SH(1)|PREMUL_SH(1)) | |
| 1278 #define TYPE_BGRA_8_PLANAR (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(1)|DOSWAP_SH(1)|SWAPFIRST_SH(1)|PLANAR_SH(1)) | |
| 1279 #define TYPE_BGRA_16 (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|SWAPFIRST_SH(1)) | |
| 1280 #define TYPE_BGRA_16_PREMUL (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|SWAPFIRST_SH(1)|PREMUL_SH(1)) | |
| 1281 #define TYPE_BGRA_16_SE (COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1)|DOSWAP_SH(1)|SWAPFIRST_SH(1)) | |
| 1282 | |
| 1283 #define TYPE_CMY_8 (COLORSPACE_SH(PT_CMY)|CHANNELS_SH(3)|BYTES_SH(1)) | |
| 1284 #define TYPE_CMY_8_PLANAR (COLORSPACE_SH(PT_CMY)|CHANNELS_SH(3)|BYTES_SH(1)|PLANAR_SH(1)) | |
| 1285 #define TYPE_CMY_16 (COLORSPACE_SH(PT_CMY)|CHANNELS_SH(3)|BYTES_SH(2)) | |
| 1286 #define TYPE_CMY_16_PLANAR (COLORSPACE_SH(PT_CMY)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1)) | |
| 1287 #define TYPE_CMY_16_SE (COLORSPACE_SH(PT_CMY)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1288 | |
| 1289 #define TYPE_CMYK_8 (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(1)) | |
| 1290 #define TYPE_CMYKA_8 (COLORSPACE_SH(PT_CMYK)|EXTRA_SH(1)|CHANNELS_SH(4)|BYTES_SH(1)) | |
| 1291 #define TYPE_CMYK_8_REV (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(1)|FLAVOR_SH(1)) | |
| 1292 #define TYPE_YUVK_8 TYPE_CMYK_8_REV | |
| 1293 #define TYPE_CMYK_8_PLANAR (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(1)|PLANAR_SH(1)) | |
| 1294 #define TYPE_CMYK_16 (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)) | |
| 1295 #define TYPE_CMYK_16_REV (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|FLAVOR_SH(1)) | |
| 1296 #define TYPE_YUVK_16 TYPE_CMYK_16_REV | |
| 1297 #define TYPE_CMYK_16_PLANAR (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|PLANAR_SH(1)) | |
| 1298 #define TYPE_CMYK_16_SE (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1299 | |
| 1300 #define TYPE_KYMC_8 (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(1)|DOSWAP_SH(1)) | |
| 1301 #define TYPE_KYMC_16 (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|DOSWAP_SH(1)) | |
| 1302 #define TYPE_KYMC_16_SE (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1)) | |
| 1303 | |
| 1304 #define TYPE_KCMY_8 (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(1)|SWAPFIRST_SH(1)) | |
| 1305 #define TYPE_KCMY_8_REV (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(1)|FLAVOR_SH(1)|SWAPFIRST_SH(1)) | |
| 1306 #define TYPE_KCMY_16 (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|SWAPFIRST_SH(1)) | |
| 1307 #define TYPE_KCMY_16_REV (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|FLAVOR_SH(1)|SWAPFIRST_SH(1)) | |
| 1308 #define TYPE_KCMY_16_SE (COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)|ENDIAN16_SH(1)|SWAPFIRST_SH(1)) | |
| 1309 | |
| 1310 #define TYPE_CMYK5_8 (COLORSPACE_SH(PT_MCH5)|CHANNELS_SH(5)|BYTES_SH(1)) | |
| 1311 #define TYPE_CMYK5_16 (COLORSPACE_SH(PT_MCH5)|CHANNELS_SH(5)|BYTES_SH(2)) | |
| 1312 #define TYPE_CMYK5_16_SE (COLORSPACE_SH(PT_MCH5)|CHANNELS_SH(5)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1313 #define TYPE_KYMC5_8 (COLORSPACE_SH(PT_MCH5)|CHANNELS_SH(5)|BYTES_SH(1)|DOSWAP_SH(1)) | |
| 1314 #define TYPE_KYMC5_16 (COLORSPACE_SH(PT_MCH5)|CHANNELS_SH(5)|BYTES_SH(2)|DOSWAP_SH(1)) | |
| 1315 #define TYPE_KYMC5_16_SE (COLORSPACE_SH(PT_MCH5)|CHANNELS_SH(5)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1)) | |
| 1316 #define TYPE_CMYK6_8 (COLORSPACE_SH(PT_MCH6)|CHANNELS_SH(6)|BYTES_SH(1)) | |
| 1317 #define TYPE_CMYK6_8_PLANAR (COLORSPACE_SH(PT_MCH6)|CHANNELS_SH(6)|BYTES_SH(1)|PLANAR_SH(1)) | |
| 1318 #define TYPE_CMYK6_16 (COLORSPACE_SH(PT_MCH6)|CHANNELS_SH(6)|BYTES_SH(2)) | |
| 1319 #define TYPE_CMYK6_16_PLANAR (COLORSPACE_SH(PT_MCH6)|CHANNELS_SH(6)|BYTES_SH(2)|PLANAR_SH(1)) | |
| 1320 #define TYPE_CMYK6_16_SE (COLORSPACE_SH(PT_MCH6)|CHANNELS_SH(6)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1321 #define TYPE_CMYK7_8 (COLORSPACE_SH(PT_MCH7)|CHANNELS_SH(7)|BYTES_SH(1)) | |
| 1322 #define TYPE_CMYK7_16 (COLORSPACE_SH(PT_MCH7)|CHANNELS_SH(7)|BYTES_SH(2)) | |
| 1323 #define TYPE_CMYK7_16_SE (COLORSPACE_SH(PT_MCH7)|CHANNELS_SH(7)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1324 #define TYPE_KYMC7_8 (COLORSPACE_SH(PT_MCH7)|CHANNELS_SH(7)|BYTES_SH(1)|DOSWAP_SH(1)) | |
| 1325 #define TYPE_KYMC7_16 (COLORSPACE_SH(PT_MCH7)|CHANNELS_SH(7)|BYTES_SH(2)|DOSWAP_SH(1)) | |
| 1326 #define TYPE_KYMC7_16_SE (COLORSPACE_SH(PT_MCH7)|CHANNELS_SH(7)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1)) | |
| 1327 #define TYPE_CMYK8_8 (COLORSPACE_SH(PT_MCH8)|CHANNELS_SH(8)|BYTES_SH(1)) | |
| 1328 #define TYPE_CMYK8_16 (COLORSPACE_SH(PT_MCH8)|CHANNELS_SH(8)|BYTES_SH(2)) | |
| 1329 #define TYPE_CMYK8_16_SE (COLORSPACE_SH(PT_MCH8)|CHANNELS_SH(8)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1330 #define TYPE_KYMC8_8 (COLORSPACE_SH(PT_MCH8)|CHANNELS_SH(8)|BYTES_SH(1)|DOSWAP_SH(1)) | |
| 1331 #define TYPE_KYMC8_16 (COLORSPACE_SH(PT_MCH8)|CHANNELS_SH(8)|BYTES_SH(2)|DOSWAP_SH(1)) | |
| 1332 #define TYPE_KYMC8_16_SE (COLORSPACE_SH(PT_MCH8)|CHANNELS_SH(8)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1)) | |
| 1333 #define TYPE_CMYK9_8 (COLORSPACE_SH(PT_MCH9)|CHANNELS_SH(9)|BYTES_SH(1)) | |
| 1334 #define TYPE_CMYK9_16 (COLORSPACE_SH(PT_MCH9)|CHANNELS_SH(9)|BYTES_SH(2)) | |
| 1335 #define TYPE_CMYK9_16_SE (COLORSPACE_SH(PT_MCH9)|CHANNELS_SH(9)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1336 #define TYPE_KYMC9_8 (COLORSPACE_SH(PT_MCH9)|CHANNELS_SH(9)|BYTES_SH(1)|DOSWAP_SH(1)) | |
| 1337 #define TYPE_KYMC9_16 (COLORSPACE_SH(PT_MCH9)|CHANNELS_SH(9)|BYTES_SH(2)|DOSWAP_SH(1)) | |
| 1338 #define TYPE_KYMC9_16_SE (COLORSPACE_SH(PT_MCH9)|CHANNELS_SH(9)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1)) | |
| 1339 #define TYPE_CMYK10_8 (COLORSPACE_SH(PT_MCH10)|CHANNELS_SH(10)|BYTES_SH(1)) | |
| 1340 #define TYPE_CMYK10_16 (COLORSPACE_SH(PT_MCH10)|CHANNELS_SH(10)|BYTES_SH(2)) | |
| 1341 #define TYPE_CMYK10_16_SE (COLORSPACE_SH(PT_MCH10)|CHANNELS_SH(10)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1342 #define TYPE_KYMC10_8 (COLORSPACE_SH(PT_MCH10)|CHANNELS_SH(10)|BYTES_SH(1)|DOSWAP_SH(1)) | |
| 1343 #define TYPE_KYMC10_16 (COLORSPACE_SH(PT_MCH10)|CHANNELS_SH(10)|BYTES_SH(2)|DOSWAP_SH(1)) | |
| 1344 #define TYPE_KYMC10_16_SE (COLORSPACE_SH(PT_MCH10)|CHANNELS_SH(10)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1)) | |
| 1345 #define TYPE_CMYK11_8 (COLORSPACE_SH(PT_MCH11)|CHANNELS_SH(11)|BYTES_SH(1)) | |
| 1346 #define TYPE_CMYK11_16 (COLORSPACE_SH(PT_MCH11)|CHANNELS_SH(11)|BYTES_SH(2)) | |
| 1347 #define TYPE_CMYK11_16_SE (COLORSPACE_SH(PT_MCH11)|CHANNELS_SH(11)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1348 #define TYPE_KYMC11_8 (COLORSPACE_SH(PT_MCH11)|CHANNELS_SH(11)|BYTES_SH(1)|DOSWAP_SH(1)) | |
| 1349 #define TYPE_KYMC11_16 (COLORSPACE_SH(PT_MCH11)|CHANNELS_SH(11)|BYTES_SH(2)|DOSWAP_SH(1)) | |
| 1350 #define TYPE_KYMC11_16_SE (COLORSPACE_SH(PT_MCH11)|CHANNELS_SH(11)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1)) | |
| 1351 #define TYPE_CMYK12_8 (COLORSPACE_SH(PT_MCH12)|CHANNELS_SH(12)|BYTES_SH(1)) | |
| 1352 #define TYPE_CMYK12_16 (COLORSPACE_SH(PT_MCH12)|CHANNELS_SH(12)|BYTES_SH(2)) | |
| 1353 #define TYPE_CMYK12_16_SE (COLORSPACE_SH(PT_MCH12)|CHANNELS_SH(12)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1354 #define TYPE_KYMC12_8 (COLORSPACE_SH(PT_MCH12)|CHANNELS_SH(12)|BYTES_SH(1)|DOSWAP_SH(1)) | |
| 1355 #define TYPE_KYMC12_16 (COLORSPACE_SH(PT_MCH12)|CHANNELS_SH(12)|BYTES_SH(2)|DOSWAP_SH(1)) | |
| 1356 #define TYPE_KYMC12_16_SE (COLORSPACE_SH(PT_MCH12)|CHANNELS_SH(12)|BYTES_SH(2)|DOSWAP_SH(1)|ENDIAN16_SH(1)) | |
| 1357 | |
| 1358 // Colorimetric | |
| 1359 #define TYPE_XYZ_16 (COLORSPACE_SH(PT_XYZ)|CHANNELS_SH(3)|BYTES_SH(2)) | |
| 1360 #define TYPE_Lab_8 (COLORSPACE_SH(PT_Lab)|CHANNELS_SH(3)|BYTES_SH(1)) | |
| 1361 #define TYPE_LabV2_8 (COLORSPACE_SH(PT_LabV2)|CHANNELS_SH(3)|BYTES_SH(1)) | |
| 1362 | |
| 1363 #define TYPE_ALab_8 (COLORSPACE_SH(PT_Lab)|CHANNELS_SH(3)|BYTES_SH(1)|EXTRA_SH(1)|SWAPFIRST_SH(1)) | |
| 1364 #define TYPE_ALabV2_8 (COLORSPACE_SH(PT_LabV2)|CHANNELS_SH(3)|BYTES_SH(1)|EXTRA_SH(1)|SWAPFIRST_SH(1)) | |
| 1365 #define TYPE_Lab_16 (COLORSPACE_SH(PT_Lab)|CHANNELS_SH(3)|BYTES_SH(2)) | |
| 1366 #define TYPE_LabV2_16 (COLORSPACE_SH(PT_LabV2)|CHANNELS_SH(3)|BYTES_SH(2)) | |
| 1367 #define TYPE_Yxy_16 (COLORSPACE_SH(PT_Yxy)|CHANNELS_SH(3)|BYTES_SH(2)) | |
| 1368 | |
| 1369 // YCbCr | |
| 1370 #define TYPE_YCbCr_8 (COLORSPACE_SH(PT_YCbCr)|CHANNELS_SH(3)|BYTES_SH(1)) | |
| 1371 #define TYPE_YCbCr_8_PLANAR (COLORSPACE_SH(PT_YCbCr)|CHANNELS_SH(3)|BYTES_SH(1)|PLANAR_SH(1)) | |
| 1372 #define TYPE_YCbCr_16 (COLORSPACE_SH(PT_YCbCr)|CHANNELS_SH(3)|BYTES_SH(2)) | |
| 1373 #define TYPE_YCbCr_16_PLANAR (COLORSPACE_SH(PT_YCbCr)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1)) | |
| 1374 #define TYPE_YCbCr_16_SE (COLORSPACE_SH(PT_YCbCr)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1375 | |
| 1376 // YUV | |
| 1377 #define TYPE_YUV_8 (COLORSPACE_SH(PT_YUV)|CHANNELS_SH(3)|BYTES_SH(1)) | |
| 1378 #define TYPE_YUV_8_PLANAR (COLORSPACE_SH(PT_YUV)|CHANNELS_SH(3)|BYTES_SH(1)|PLANAR_SH(1)) | |
| 1379 #define TYPE_YUV_16 (COLORSPACE_SH(PT_YUV)|CHANNELS_SH(3)|BYTES_SH(2)) | |
| 1380 #define TYPE_YUV_16_PLANAR (COLORSPACE_SH(PT_YUV)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1)) | |
| 1381 #define TYPE_YUV_16_SE (COLORSPACE_SH(PT_YUV)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1382 | |
| 1383 // HLS | |
| 1384 #define TYPE_HLS_8 (COLORSPACE_SH(PT_HLS)|CHANNELS_SH(3)|BYTES_SH(1)) | |
| 1385 #define TYPE_HLS_8_PLANAR (COLORSPACE_SH(PT_HLS)|CHANNELS_SH(3)|BYTES_SH(1)|PLANAR_SH(1)) | |
| 1386 #define TYPE_HLS_16 (COLORSPACE_SH(PT_HLS)|CHANNELS_SH(3)|BYTES_SH(2)) | |
| 1387 #define TYPE_HLS_16_PLANAR (COLORSPACE_SH(PT_HLS)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1)) | |
| 1388 #define TYPE_HLS_16_SE (COLORSPACE_SH(PT_HLS)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1389 | |
| 1390 // HSV | |
| 1391 #define TYPE_HSV_8 (COLORSPACE_SH(PT_HSV)|CHANNELS_SH(3)|BYTES_SH(1)) | |
| 1392 #define TYPE_HSV_8_PLANAR (COLORSPACE_SH(PT_HSV)|CHANNELS_SH(3)|BYTES_SH(1)|PLANAR_SH(1)) | |
| 1393 #define TYPE_HSV_16 (COLORSPACE_SH(PT_HSV)|CHANNELS_SH(3)|BYTES_SH(2)) | |
| 1394 #define TYPE_HSV_16_PLANAR (COLORSPACE_SH(PT_HSV)|CHANNELS_SH(3)|BYTES_SH(2)|PLANAR_SH(1)) | |
| 1395 #define TYPE_HSV_16_SE (COLORSPACE_SH(PT_HSV)|CHANNELS_SH(3)|BYTES_SH(2)|ENDIAN16_SH(1)) | |
| 1396 | |
| 1397 // Named color index. Only 16 bits is allowed (don't check colorspace) | |
| 1398 #define TYPE_NAMED_COLOR_INDEX (CHANNELS_SH(1)|BYTES_SH(2)) | |
| 1399 | |
| 1400 // Float formatters. | |
| 1401 #define TYPE_XYZ_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_XYZ)|CHANNELS_SH(3)|BYTES_SH(4)) | |
| 1402 #define TYPE_Lab_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_Lab)|CHANNELS_SH(3)|BYTES_SH(4)) | |
| 1403 #define TYPE_LabA_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_Lab)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)) | |
| 1404 #define TYPE_GRAY_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(4)) | |
| 1405 #define TYPE_GRAYA_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(4)|EXTRA_SH(1)) | |
| 1406 #define TYPE_GRAYA_FLT_PREMUL (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(4)|EXTRA_SH(1)|PREMUL_SH(1)) | |
| 1407 #define TYPE_RGB_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(4)) | |
| 1408 | |
| 1409 #define TYPE_RGBA_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)) | |
| 1410 #define TYPE_RGBA_FLT_PREMUL (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)|PREMUL_SH(1)) | |
| 1411 #define TYPE_ARGB_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)|SWAPFIRST_SH(1)) | |
| 1412 #define TYPE_ARGB_FLT_PREMUL (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)|SWAPFIRST_SH(1)|PREMUL_SH(1)) | |
| 1413 #define TYPE_BGR_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(4)|DOSWAP_SH(1)) | |
| 1414 #define TYPE_BGRA_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)|DOSWAP_SH(1)|SWAPFIRST_SH(1)) | |
| 1415 #define TYPE_BGRA_FLT_PREMUL (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)|DOSWAP_SH(1)|SWAPFIRST_SH(1)|PREMUL_SH(1)) | |
| 1416 #define TYPE_ABGR_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)|DOSWAP_SH(1)) | |
| 1417 #define TYPE_ABGR_FLT_PREMUL (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(4)|DOSWAP_SH(1)|PREMUL_SH(1)) | |
| 1418 | |
| 1419 #define TYPE_CMYK_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(4)) | |
| 1420 | |
| 1421 // Floating point formatters. | |
| 1422 // NOTE THAT 'BYTES' FIELD IS SET TO ZERO ON DLB because 8 bytes overflows the bitfield | |
| 1423 #define TYPE_XYZ_DBL (FLOAT_SH(1)|COLORSPACE_SH(PT_XYZ)|CHANNELS_SH(3)|BYTES_SH(0)) | |
| 1424 #define TYPE_Lab_DBL (FLOAT_SH(1)|COLORSPACE_SH(PT_Lab)|CHANNELS_SH(3)|BYTES_SH(0)) | |
| 1425 #define TYPE_GRAY_DBL (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(0)) | |
| 1426 #define TYPE_RGB_DBL (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(0)) | |
| 1427 #define TYPE_BGR_DBL (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(0)|DOSWAP_SH(1)) | |
| 1428 #define TYPE_CMYK_DBL (FLOAT_SH(1)|COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(0)) | |
| 1429 #define TYPE_OKLAB_DBL (FLOAT_SH(1)|COLORSPACE_SH(PT_MCH3)|CHANNELS_SH(3)|BYTES_SH(0)) | |
| 1430 | |
| 1431 // IEEE 754-2008 "half" | |
| 1432 #define TYPE_GRAY_HALF_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_GRAY)|CHANNELS_SH(1)|BYTES_SH(2)) | |
| 1433 #define TYPE_RGB_HALF_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)) | |
| 1434 #define TYPE_RGBA_HALF_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)) | |
| 1435 #define TYPE_CMYK_HALF_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_CMYK)|CHANNELS_SH(4)|BYTES_SH(2)) | |
| 1436 | |
| 1437 #define TYPE_RGBA_HALF_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)) | |
| 1438 #define TYPE_ARGB_HALF_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|SWAPFIRST_SH(1)) | |
| 1439 #define TYPE_BGR_HALF_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)) | |
| 1440 #define TYPE_BGRA_HALF_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|EXTRA_SH(1)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)|SWAPFIRST_SH(1)) | |
| 1441 #define TYPE_ABGR_HALF_FLT (FLOAT_SH(1)|COLORSPACE_SH(PT_RGB)|CHANNELS_SH(3)|BYTES_SH(2)|DOSWAP_SH(1)) | |
| 1442 | |
| 1443 #endif | |
| 1444 | |
| 1445 // Colorspaces | |
| 1446 typedef struct { | |
| 1447 cmsFloat64Number X; | |
| 1448 cmsFloat64Number Y; | |
| 1449 cmsFloat64Number Z; | |
| 1450 | |
| 1451 } cmsCIEXYZ; | |
| 1452 | |
| 1453 typedef struct { | |
| 1454 cmsFloat64Number x; | |
| 1455 cmsFloat64Number y; | |
| 1456 cmsFloat64Number Y; | |
| 1457 | |
| 1458 } cmsCIExyY; | |
| 1459 | |
| 1460 typedef struct { | |
| 1461 cmsFloat64Number L; | |
| 1462 cmsFloat64Number a; | |
| 1463 cmsFloat64Number b; | |
| 1464 | |
| 1465 } cmsCIELab; | |
| 1466 | |
| 1467 typedef struct { | |
| 1468 cmsFloat64Number L; | |
| 1469 cmsFloat64Number C; | |
| 1470 cmsFloat64Number h; | |
| 1471 | |
| 1472 } cmsCIELCh; | |
| 1473 | |
| 1474 typedef struct { | |
| 1475 cmsFloat64Number J; | |
| 1476 cmsFloat64Number C; | |
| 1477 cmsFloat64Number h; | |
| 1478 | |
| 1479 } cmsJCh; | |
| 1480 | |
| 1481 typedef struct { | |
| 1482 cmsCIEXYZ Red; | |
| 1483 cmsCIEXYZ Green; | |
| 1484 cmsCIEXYZ Blue; | |
| 1485 | |
| 1486 } cmsCIEXYZTRIPLE; | |
| 1487 | |
| 1488 typedef struct { | |
| 1489 cmsCIExyY Red; | |
| 1490 cmsCIExyY Green; | |
| 1491 cmsCIExyY Blue; | |
| 1492 | |
| 1493 } cmsCIExyYTRIPLE; | |
| 1494 | |
| 1495 // Illuminant types for structs below | |
| 1496 #define cmsILLUMINANT_TYPE_UNKNOWN 0x0000000 | |
| 1497 #define cmsILLUMINANT_TYPE_D50 0x0000001 | |
| 1498 #define cmsILLUMINANT_TYPE_D65 0x0000002 | |
| 1499 #define cmsILLUMINANT_TYPE_D93 0x0000003 | |
| 1500 #define cmsILLUMINANT_TYPE_F2 0x0000004 | |
| 1501 #define cmsILLUMINANT_TYPE_D55 0x0000005 | |
| 1502 #define cmsILLUMINANT_TYPE_A 0x0000006 | |
| 1503 #define cmsILLUMINANT_TYPE_E 0x0000007 | |
| 1504 #define cmsILLUMINANT_TYPE_F8 0x0000008 | |
| 1505 | |
| 1506 typedef struct { | |
| 1507 cmsUInt32Number Observer; // 0 = unknown, 1=CIE 1931, 2=CIE 1964 | |
| 1508 cmsCIEXYZ Backing; // Value of backing | |
| 1509 cmsUInt32Number Geometry; // 0=unknown, 1=45/0, 0/45 2=0d, d/0 | |
| 1510 cmsFloat64Number Flare; // 0..1.0 | |
| 1511 cmsUInt32Number IlluminantType; | |
| 1512 | |
| 1513 } cmsICCMeasurementConditions; | |
| 1514 | |
| 1515 typedef struct { | |
| 1516 cmsCIEXYZ IlluminantXYZ; // Not the same struct as CAM02, | |
| 1517 cmsCIEXYZ SurroundXYZ; // This is for storing the tag | |
| 1518 cmsUInt32Number IlluminantType; // viewing condition | |
| 1519 | |
| 1520 } cmsICCViewingConditions; | |
| 1521 | |
| 1522 typedef struct { | |
| 1523 cmsUInt8Number ColourPrimaries; // Recommendation ITU-T H.273 | |
| 1524 cmsUInt8Number TransferCharacteristics; // (ISO/IEC 23091-2) | |
| 1525 cmsUInt8Number MatrixCoefficients; | |
| 1526 cmsUInt8Number VideoFullRangeFlag; | |
| 1527 | |
| 1528 } cmsVideoSignalType; | |
| 1529 | |
| 1530 typedef struct { | |
| 1531 cmsUInt32Number CurveEntries; | |
| 1532 cmsFloat64Number* RedCurve; | |
| 1533 cmsFloat64Number* GreenCurve; | |
| 1534 cmsFloat64Number* BlueCurve; | |
| 1535 | |
| 1536 cmsFloat64Number MinLuminance; // ST.2086 min luminance in nits | |
| 1537 cmsFloat64Number PeakLuminance; // ST.2086 peak luminance in nits | |
| 1538 | |
| 1539 cmsFloat64Number XYZ2XYZmatrix[3][4]; | |
| 1540 | |
| 1541 } cmsMHC2Type; | |
| 1542 | |
| 1543 | |
| 1544 | |
| 1545 // Get LittleCMS version (for shared objects) ----------------------------------------------------------------------------- | |
| 1546 | |
| 1547 CMSAPI int CMSEXPORT cmsGetEncodedCMMversion(void); | |
| 1548 | |
| 1549 // Support of non-standard functions -------------------------------------------------------------------------------------- | |
| 1550 | |
| 1551 CMSAPI int CMSEXPORT cmsstrcasecmp(const char* s1, const char* s2); | |
| 1552 CMSAPI long int CMSEXPORT cmsfilelength(FILE* f); | |
| 1553 | |
| 1554 | |
| 1555 // Context handling -------------------------------------------------------------------------------------------------------- | |
| 1556 | |
| 1557 // Each context holds its owns globals and its own plug-ins. There is a global context with the id = 0 for lecacy compatibility | |
| 1558 // though using the global context is not recommended. Proper context handling makes lcms more thread-safe. | |
| 1559 | |
| 1560 typedef struct _cmsContext_struct* cmsContext; | |
| 1561 | |
| 1562 CMSAPI cmsContext CMSEXPORT cmsCreateContext(void* Plugin, void* UserData); | |
| 1563 CMSAPI void CMSEXPORT cmsDeleteContext(cmsContext ContextID); | |
| 1564 CMSAPI cmsContext CMSEXPORT cmsDupContext(cmsContext ContextID, void* NewUserData); | |
| 1565 CMSAPI void* CMSEXPORT cmsGetContextUserData(cmsContext ContextID); | |
| 1566 | |
| 1567 // Plug-In registering -------------------------------------------------------------------------------------------------- | |
| 1568 | |
| 1569 CMSAPI cmsBool CMSEXPORT cmsPlugin(cmsContext ContextID, void* Plugin); | |
| 1570 CMSAPI void CMSEXPORT cmsUnregisterPlugins(cmsContext ContextID); | |
| 1571 | |
| 1572 // Error logging ---------------------------------------------------------------------------------------------------------- | |
| 1573 | |
| 1574 // There is no error handling at all. When a function fails, it returns proper value. | |
| 1575 // For example, all create functions does return NULL on failure. Other may return FALSE. | |
| 1576 // It may be interesting, for the developer, to know why the function is failing. | |
| 1577 // for that reason, lcms2 does offer a logging function. This function will get | |
| 1578 // an ENGLISH string with some clues on what is going wrong. You can show this | |
| 1579 // info to the end user if you wish, or just create some sort of log on disk. | |
| 1580 // The logging function should NOT terminate the program, as this obviously can leave | |
| 1581 // unfreed resources. It is the programmer's responsibility to check each function | |
| 1582 // return code to make sure it didn't fail. | |
| 1583 | |
| 1584 #define cmsERROR_UNDEFINED 0 | |
| 1585 #define cmsERROR_FILE 1 | |
| 1586 #define cmsERROR_RANGE 2 | |
| 1587 #define cmsERROR_INTERNAL 3 | |
| 1588 #define cmsERROR_NULL 4 | |
| 1589 #define cmsERROR_READ 5 | |
| 1590 #define cmsERROR_SEEK 6 | |
| 1591 #define cmsERROR_WRITE 7 | |
| 1592 #define cmsERROR_UNKNOWN_EXTENSION 8 | |
| 1593 #define cmsERROR_COLORSPACE_CHECK 9 | |
| 1594 #define cmsERROR_ALREADY_DEFINED 10 | |
| 1595 #define cmsERROR_BAD_SIGNATURE 11 | |
| 1596 #define cmsERROR_CORRUPTION_DETECTED 12 | |
| 1597 #define cmsERROR_NOT_SUITABLE 13 | |
| 1598 | |
| 1599 // Error logger is called with the ContextID when a message is raised. This gives the | |
| 1600 // chance to know which thread is responsible of the warning and any environment associated | |
| 1601 // with it. Non-multithreading applications may safely ignore this parameter. | |
| 1602 // Note that under certain special circumstances, ContextID may be NULL. | |
| 1603 typedef void (* cmsLogErrorHandlerFunction)(cmsContext ContextID, cmsUInt32Number ErrorCode, const char *Text); | |
| 1604 | |
| 1605 // Allows user to set any specific logger | |
| 1606 CMSAPI void CMSEXPORT cmsSetLogErrorHandler(cmsContext ContextID, cmsLogErrorHandlerFunction Fn); | |
| 1607 | |
| 1608 // Conversions -------------------------------------------------------------------------------------------------------------- | |
| 1609 | |
| 1610 // Returns pointers to constant structs | |
| 1611 CMSAPI const cmsCIEXYZ* CMSEXPORT cmsD50_XYZ(cmsContext ContextID); | |
| 1612 CMSAPI const cmsCIExyY* CMSEXPORT cmsD50_xyY(cmsContext ContextID); | |
| 1613 | |
| 1614 // Colorimetric space conversions | |
| 1615 CMSAPI void CMSEXPORT cmsXYZ2xyY(cmsContext ContextID, cmsCIExyY* Dest, const cmsCIEXYZ* Source); | |
| 1616 CMSAPI void CMSEXPORT cmsxyY2XYZ(cmsContext ContextID, cmsCIEXYZ* Dest, const cmsCIExyY* Source); | |
| 1617 CMSAPI void CMSEXPORT cmsXYZ2Lab(cmsContext ContextID, const cmsCIEXYZ* WhitePoint, cmsCIELab* Lab, const cmsCIEXYZ* xyz); | |
| 1618 CMSAPI void CMSEXPORT cmsLab2XYZ(cmsContext ContextID, const cmsCIEXYZ* WhitePoint, cmsCIEXYZ* xyz, const cmsCIELab* Lab); | |
| 1619 CMSAPI void CMSEXPORT cmsLab2LCh(cmsContext ContextID, cmsCIELCh*LCh, const cmsCIELab* Lab); | |
| 1620 CMSAPI void CMSEXPORT cmsLCh2Lab(cmsContext ContextID, cmsCIELab* Lab, const cmsCIELCh* LCh); | |
| 1621 | |
| 1622 // Encoding /Decoding on PCS | |
| 1623 CMSAPI void CMSEXPORT cmsLabEncoded2Float(cmsContext ContextID, cmsCIELab* Lab, const cmsUInt16Number wLab[3]); | |
| 1624 CMSAPI void CMSEXPORT cmsLabEncoded2FloatV2(cmsContext ContextID, cmsCIELab* Lab, const cmsUInt16Number wLab[3]); | |
| 1625 CMSAPI void CMSEXPORT cmsFloat2LabEncoded(cmsContext ContextID, cmsUInt16Number wLab[3], const cmsCIELab* Lab); | |
| 1626 CMSAPI void CMSEXPORT cmsFloat2LabEncodedV2(cmsContext ContextID, cmsUInt16Number wLab[3], const cmsCIELab* Lab); | |
| 1627 CMSAPI void CMSEXPORT cmsXYZEncoded2Float(cmsContext ContextID, cmsCIEXYZ* fxyz, const cmsUInt16Number XYZ[3]); | |
| 1628 CMSAPI void CMSEXPORT cmsFloat2XYZEncoded(cmsContext ContextID, cmsUInt16Number XYZ[3], const cmsCIEXYZ* fXYZ); | |
| 1629 | |
| 1630 // DeltaE metrics | |
| 1631 CMSAPI cmsFloat64Number CMSEXPORT cmsDeltaE(cmsContext ContextID, const cmsCIELab* Lab1, const cmsCIELab* Lab2); | |
| 1632 CMSAPI cmsFloat64Number CMSEXPORT cmsCIE94DeltaE(cmsContext ContextID, const cmsCIELab* Lab1, const cmsCIELab* Lab2); | |
| 1633 CMSAPI cmsFloat64Number CMSEXPORT cmsBFDdeltaE(cmsContext ContextID, const cmsCIELab* Lab1, const cmsCIELab* Lab2); | |
| 1634 CMSAPI cmsFloat64Number CMSEXPORT cmsCMCdeltaE(cmsContext ContextID, const cmsCIELab* Lab1, const cmsCIELab* Lab2, cmsFloat64Number l, cmsFloat64Number c); | |
| 1635 CMSAPI cmsFloat64Number CMSEXPORT cmsCIE2000DeltaE(cmsContext ContextID, const cmsCIELab* Lab1, const cmsCIELab* Lab2, cmsFloat64Number Kl, cmsFloat64Number Kc, cmsFloat64Number Kh); | |
| 1636 | |
| 1637 // Temperature <-> Chromaticity (Black body) | |
| 1638 CMSAPI cmsBool CMSEXPORT cmsWhitePointFromTemp(cmsContext ContextID, cmsCIExyY* WhitePoint, cmsFloat64Number TempK); | |
| 1639 CMSAPI cmsBool CMSEXPORT cmsTempFromWhitePoint(cmsContext ContextID, cmsFloat64Number* TempK, const cmsCIExyY* WhitePoint); | |
| 1640 | |
| 1641 // Chromatic adaptation | |
| 1642 CMSAPI cmsBool CMSEXPORT cmsAdaptToIlluminant(cmsContext ContextID, cmsCIEXYZ* Result, const cmsCIEXYZ* SourceWhitePt, | |
| 1643 const cmsCIEXYZ* Illuminant, | |
| 1644 const cmsCIEXYZ* Value); | |
| 1645 | |
| 1646 // CIECAM02 --------------------------------------------------------------------------------------------------- | |
| 1647 | |
| 1648 // Viewing conditions. Please note those are CAM model viewing conditions, and not the ICC tag viewing | |
| 1649 // conditions, which I'm naming cmsICCViewingConditions to make differences evident. Unfortunately, the tag | |
| 1650 // cannot deal with surround La, Yb and D value so is basically useless to store CAM02 viewing conditions. | |
| 1651 | |
| 1652 | |
| 1653 #define AVG_SURROUND 1 | |
| 1654 #define DIM_SURROUND 2 | |
| 1655 #define DARK_SURROUND 3 | |
| 1656 #define CUTSHEET_SURROUND 4 | |
| 1657 | |
| 1658 #define D_CALCULATE (-1) | |
| 1659 | |
| 1660 typedef struct { | |
| 1661 cmsCIEXYZ whitePoint; | |
| 1662 cmsFloat64Number Yb; | |
| 1663 cmsFloat64Number La; | |
| 1664 cmsUInt32Number surround; | |
| 1665 cmsFloat64Number D_value; | |
| 1666 | |
| 1667 } cmsViewingConditions; | |
| 1668 | |
| 1669 CMSAPI cmsHANDLE CMSEXPORT cmsCIECAM02Init(cmsContext ContextID, const cmsViewingConditions* pVC); | |
| 1670 CMSAPI void CMSEXPORT cmsCIECAM02Done(cmsContext ContextID, cmsHANDLE hModel); | |
| 1671 CMSAPI void CMSEXPORT cmsCIECAM02Forward(cmsContext ContextID, cmsHANDLE hModel, const cmsCIEXYZ* pIn, cmsJCh* pOut); | |
| 1672 CMSAPI void CMSEXPORT cmsCIECAM02Reverse(cmsContext ContextID, cmsHANDLE hModel, const cmsJCh* pIn, cmsCIEXYZ* pOut); | |
| 1673 | |
| 1674 | |
| 1675 // Tone curves ----------------------------------------------------------------------------------------- | |
| 1676 | |
| 1677 // This describes a curve segment. For a table of supported types, see the manual. User can increase the number of | |
| 1678 // available types by using a proper plug-in. Parametric segments allow 10 parameters at most | |
| 1679 | |
| 1680 typedef struct { | |
| 1681 cmsFloat32Number x0, x1; // Domain; for x0 < x <= x1 | |
| 1682 cmsInt32Number Type; // Parametric type, Type == 0 means sampled segment. Negative values are reserved | |
| 1683 cmsFloat64Number Params[10]; // Parameters if Type != 0 | |
| 1684 cmsUInt32Number nGridPoints; // Number of grid points if Type == 0 | |
| 1685 cmsFloat32Number* SampledPoints; // Points to an array of floats if Type == 0 | |
| 1686 | |
| 1687 } cmsCurveSegment; | |
| 1688 | |
| 1689 // The internal representation is none of your business. | |
| 1690 typedef struct _cms_curve_struct cmsToneCurve; | |
| 1691 | |
| 1692 CMSAPI cmsToneCurve* CMSEXPORT cmsBuildSegmentedToneCurve(cmsContext ContextID, cmsUInt32Number nSegments, const cmsCurveSegment Segments[]); | |
| 1693 CMSAPI cmsToneCurve* CMSEXPORT cmsBuildParametricToneCurve(cmsContext ContextID, cmsInt32Number Type, const cmsFloat64Number Params[]); | |
| 1694 CMSAPI cmsToneCurve* CMSEXPORT cmsBuildGamma(cmsContext ContextID, cmsFloat64Number Gamma); | |
| 1695 CMSAPI cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurve16(cmsContext ContextID, cmsUInt32Number nEntries, const cmsUInt16Number values[]); | |
| 1696 CMSAPI cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurveFloat(cmsContext ContextID, cmsUInt32Number nEntries, const cmsFloat32Number values[]); | |
| 1697 CMSAPI void CMSEXPORT cmsFreeToneCurve(cmsContext ContextID, cmsToneCurve* Curve); | |
| 1698 CMSAPI void CMSEXPORT cmsFreeToneCurveTriple(cmsContext ContextID, cmsToneCurve* Curve[3]); | |
| 1699 CMSAPI cmsToneCurve* CMSEXPORT cmsDupToneCurve(cmsContext ContextID, const cmsToneCurve* Src); | |
| 1700 CMSAPI cmsToneCurve* CMSEXPORT cmsReverseToneCurve(cmsContext ContextID, const cmsToneCurve* InGamma); | |
| 1701 CMSAPI cmsToneCurve* CMSEXPORT cmsReverseToneCurveEx(cmsContext ContextID, cmsUInt32Number nResultSamples, const cmsToneCurve* InGamma); | |
| 1702 CMSAPI cmsToneCurve* CMSEXPORT cmsJoinToneCurve(cmsContext ContextID, const cmsToneCurve* X, const cmsToneCurve* Y, cmsUInt32Number nPoints); | |
| 1703 CMSAPI cmsBool CMSEXPORT cmsSmoothToneCurve(cmsContext ContextID, cmsToneCurve* Tab, cmsFloat64Number lambda); | |
| 1704 CMSAPI cmsFloat32Number CMSEXPORT cmsEvalToneCurveFloat(cmsContext ContextID, const cmsToneCurve* Curve, cmsFloat32Number v); | |
| 1705 CMSAPI cmsUInt16Number CMSEXPORT cmsEvalToneCurve16(const cmsContext ContextID, const cmsToneCurve* Curve, cmsUInt16Number v); | |
| 1706 CMSAPI cmsBool CMSEXPORT cmsIsToneCurveMultisegment(cmsContext ContextID, const cmsToneCurve* InGamma); | |
| 1707 CMSAPI cmsBool CMSEXPORT cmsIsToneCurveLinear(cmsContext ContextID, const cmsToneCurve* Curve); | |
| 1708 CMSAPI cmsBool CMSEXPORT cmsIsToneCurveMonotonic(cmsContext ContextID, const cmsToneCurve* t); | |
| 1709 CMSAPI cmsBool CMSEXPORT cmsIsToneCurveDescending(cmsContext ContextID, const cmsToneCurve* t); | |
| 1710 CMSAPI cmsInt32Number CMSEXPORT cmsGetToneCurveParametricType(cmsContext ContextID, const cmsToneCurve* t); | |
| 1711 CMSAPI cmsFloat64Number CMSEXPORT cmsEstimateGamma(cmsContext ContextID, const cmsToneCurve* t, cmsFloat64Number Precision); | |
| 1712 | |
| 1713 CMSAPI const cmsCurveSegment* CMSEXPORT cmsGetToneCurveSegment(cmsContext ContextID, cmsInt32Number n, const cmsToneCurve* t); | |
| 1714 | |
| 1715 // Tone curve tabular estimation | |
| 1716 CMSAPI cmsUInt32Number CMSEXPORT cmsGetToneCurveEstimatedTableEntries(cmsContext ContextID, const cmsToneCurve* t); | |
| 1717 CMSAPI const cmsUInt16Number* CMSEXPORT cmsGetToneCurveEstimatedTable(cmsContext ContextID, const cmsToneCurve* t); | |
| 1718 | |
| 1719 | |
| 1720 // Implements pipelines of multi-processing elements ------------------------------------------------------------- | |
| 1721 | |
| 1722 // Nothing to see here, move along | |
| 1723 typedef struct _cmsPipeline_struct cmsPipeline; | |
| 1724 typedef struct _cmsStage_struct cmsStage; | |
| 1725 | |
| 1726 // Those are hi-level pipelines | |
| 1727 CMSAPI cmsPipeline* CMSEXPORT cmsPipelineAlloc(cmsContext ContextID, cmsUInt32Number InputChannels, cmsUInt32Number OutputChannels); | |
| 1728 CMSAPI void CMSEXPORT cmsPipelineFree(cmsContext ContextID, cmsPipeline* lut); | |
| 1729 CMSAPI cmsPipeline* CMSEXPORT cmsPipelineDup(cmsContext ContextID, const cmsPipeline* Orig); | |
| 1730 | |
| 1731 CMSAPI cmsUInt32Number CMSEXPORT cmsPipelineInputChannels(cmsContext ContextID, const cmsPipeline* lut); | |
| 1732 CMSAPI cmsUInt32Number CMSEXPORT cmsPipelineOutputChannels(cmsContext ContextID, const cmsPipeline* lut); | |
| 1733 | |
| 1734 CMSAPI cmsUInt32Number CMSEXPORT cmsPipelineStageCount(cmsContext ContextID, const cmsPipeline* lut); | |
| 1735 CMSAPI cmsStage* CMSEXPORT cmsPipelineGetPtrToFirstStage(cmsContext ContextID, const cmsPipeline* lut); | |
| 1736 CMSAPI cmsStage* CMSEXPORT cmsPipelineGetPtrToLastStage(cmsContext ContextID, const cmsPipeline* lut); | |
| 1737 | |
| 1738 CMSAPI void CMSEXPORT cmsPipelineEval16(cmsContext ContextID, const cmsUInt16Number In[], cmsUInt16Number Out[], const cmsPipeline* lut); | |
| 1739 CMSAPI void CMSEXPORT cmsPipelineEvalFloat(cmsContext ContextID, const cmsFloat32Number In[], cmsFloat32Number Out[], const cmsPipeline* lut); | |
| 1740 CMSAPI cmsBool CMSEXPORT cmsPipelineEvalReverseFloat(cmsContext ContextID, cmsFloat32Number Target[], cmsFloat32Number Result[], cmsFloat32Number Hint[], const cmsPipeline* lut); | |
| 1741 CMSAPI cmsBool CMSEXPORT cmsPipelineCat(cmsContext ContextID, cmsPipeline* l1, const cmsPipeline* l2); | |
| 1742 CMSAPI cmsBool CMSEXPORT cmsPipelineSetSaveAs8bitsFlag(cmsContext ContextID, cmsPipeline* lut, cmsBool On); | |
| 1743 | |
| 1744 // Where to place/locate the stages in the pipeline chain | |
| 1745 typedef enum { cmsAT_BEGIN, cmsAT_END } cmsStageLoc; | |
| 1746 | |
| 1747 CMSAPI cmsBool CMSEXPORT cmsPipelineInsertStage(cmsContext ContextID, cmsPipeline* lut, cmsStageLoc loc, cmsStage* mpe); | |
| 1748 CMSAPI void CMSEXPORT cmsPipelineUnlinkStage(cmsContext ContextID, cmsPipeline* lut, cmsStageLoc loc, cmsStage** mpe); | |
| 1749 | |
| 1750 // This function is quite useful to analyze the structure of a Pipeline and retrieve the Stage elements | |
| 1751 // that conform the Pipeline. It should be called with the Pipeline, the number of expected elements and | |
| 1752 // then a list of expected types followed with a list of double pointers to Stage elements. If | |
| 1753 // the function founds a match with current pipeline, it fills the pointers and returns TRUE | |
| 1754 // if not, returns FALSE without touching anything. | |
| 1755 CMSAPI cmsBool CMSEXPORT cmsPipelineCheckAndRetreiveStages(cmsContext ContextID, const cmsPipeline* Lut, cmsUInt32Number n, ...); | |
| 1756 | |
| 1757 // Matrix has double precision and CLUT has only float precision. That is because an ICC profile can encode | |
| 1758 // matrices with far more precision that CLUTS | |
| 1759 CMSAPI cmsStage* CMSEXPORT cmsStageAllocIdentity(cmsContext ContextID, cmsUInt32Number nChannels); | |
| 1760 CMSAPI cmsStage* CMSEXPORT cmsStageAllocToneCurves(cmsContext ContextID, cmsUInt32Number nChannels, cmsToneCurve* const Curves[]); | |
| 1761 CMSAPI cmsStage* CMSEXPORT cmsStageAllocMatrix(cmsContext ContextID, cmsUInt32Number Rows, cmsUInt32Number Cols, const cmsFloat64Number* Matrix, const cmsFloat64Number* Offset); | |
| 1762 | |
| 1763 CMSAPI cmsStage* CMSEXPORT cmsStageAllocCLut16bit(cmsContext ContextID, cmsUInt32Number nGridPoints, cmsUInt32Number inputChan, cmsUInt32Number outputChan, const cmsUInt16Number* Table); | |
| 1764 CMSAPI cmsStage* CMSEXPORT cmsStageAllocCLutFloat(cmsContext ContextID, cmsUInt32Number nGridPoints, cmsUInt32Number inputChan, cmsUInt32Number outputChan, const cmsFloat32Number* Table); | |
| 1765 | |
| 1766 CMSAPI cmsStage* CMSEXPORT cmsStageAllocCLut16bitGranular(cmsContext ContextID, const cmsUInt32Number clutPoints[], cmsUInt32Number inputChan, cmsUInt32Number outputChan, const cmsUInt16Number* Table); | |
| 1767 CMSAPI cmsStage* CMSEXPORT cmsStageAllocCLutFloatGranular(cmsContext ContextID, const cmsUInt32Number clutPoints[], cmsUInt32Number inputChan, cmsUInt32Number outputChan, const cmsFloat32Number* Table); | |
| 1768 | |
| 1769 CMSAPI cmsStage* CMSEXPORT cmsStageDup(cmsContext ContextID, cmsStage* mpe); | |
| 1770 CMSAPI void CMSEXPORT cmsStageFree(cmsContext ContextID, cmsStage* mpe); | |
| 1771 CMSAPI cmsStage* CMSEXPORT cmsStageNext(cmsContext ContextID, const cmsStage* mpe); | |
| 1772 | |
| 1773 CMSAPI cmsUInt32Number CMSEXPORT cmsStageInputChannels(cmsContext ContextID, const cmsStage* mpe); | |
| 1774 CMSAPI cmsUInt32Number CMSEXPORT cmsStageOutputChannels(cmsContext ContextID, const cmsStage* mpe); | |
| 1775 CMSAPI cmsStageSignature CMSEXPORT cmsStageType(cmsContext ContextID, const cmsStage* mpe); | |
| 1776 CMSAPI void* CMSEXPORT cmsStageData(cmsContext ContextID, const cmsStage* mpe); | |
| 1777 | |
| 1778 // Sampling | |
| 1779 typedef cmsInt32Number (* cmsSAMPLER16) (cmsContext ContextID, | |
| 1780 CMSREGISTER const cmsUInt16Number In[], | |
| 1781 CMSREGISTER cmsUInt16Number Out[], | |
| 1782 CMSREGISTER void * Cargo); | |
| 1783 | |
| 1784 typedef cmsInt32Number (* cmsSAMPLERFLOAT)(cmsContext ContextID, | |
| 1785 CMSREGISTER const cmsFloat32Number In[], | |
| 1786 CMSREGISTER cmsFloat32Number Out[], | |
| 1787 CMSREGISTER void * Cargo); | |
| 1788 | |
| 1789 // Use this flag to prevent changes being written to destination | |
| 1790 #define SAMPLER_INSPECT 0x01000000 | |
| 1791 | |
| 1792 // For CLUT only | |
| 1793 CMSAPI cmsBool CMSEXPORT cmsStageSampleCLut16bit(cmsContext ContextID, cmsStage* mpe, cmsSAMPLER16 Sampler, void* Cargo, cmsUInt32Number dwFlags); | |
| 1794 CMSAPI cmsBool CMSEXPORT cmsStageSampleCLutFloat(cmsContext ContextID, cmsStage* mpe, cmsSAMPLERFLOAT Sampler, void* Cargo, cmsUInt32Number dwFlags); | |
| 1795 | |
| 1796 // Slicers | |
| 1797 CMSAPI cmsBool CMSEXPORT cmsSliceSpace16(cmsContext ContextID, cmsUInt32Number nInputs, const cmsUInt32Number clutPoints[], | |
| 1798 cmsSAMPLER16 Sampler, void * Cargo); | |
| 1799 | |
| 1800 CMSAPI cmsBool CMSEXPORT cmsSliceSpaceFloat(cmsContext ContextID, cmsUInt32Number nInputs, const cmsUInt32Number clutPoints[], | |
| 1801 cmsSAMPLERFLOAT Sampler, void * Cargo); | |
| 1802 | |
| 1803 // Multilocalized Unicode management --------------------------------------------------------------------------------------- | |
| 1804 | |
| 1805 typedef struct _cms_MLU_struct cmsMLU; | |
| 1806 | |
| 1807 #define cmsNoLanguage "\0\0" | |
| 1808 #define cmsNoCountry "\0\0" | |
| 1809 | |
| 1810 // Special language/country to retrieve unicode field for description in V2 profiles. Use with care. | |
| 1811 #define cmsV2Unicode "\xff\xff" | |
| 1812 | |
| 1813 CMSAPI cmsMLU* CMSEXPORT cmsMLUalloc(cmsContext ContextID, cmsUInt32Number nItems); | |
| 1814 CMSAPI void CMSEXPORT cmsMLUfree(cmsContext ContextID, cmsMLU* mlu); | |
| 1815 CMSAPI cmsMLU* CMSEXPORT cmsMLUdup(cmsContext ContextID, const cmsMLU* mlu); | |
| 1816 | |
| 1817 CMSAPI cmsBool CMSEXPORT cmsMLUsetASCII(cmsContext ContextID, cmsMLU* mlu, | |
| 1818 const char LanguageCode[3], const char CountryCode[3], | |
| 1819 const char* ASCIIString); | |
| 1820 CMSAPI cmsBool CMSEXPORT cmsMLUsetWide(cmsContext ContextID, cmsMLU* mlu, | |
| 1821 const char LanguageCode[3], const char CountryCode[3], | |
| 1822 const wchar_t* WideString); | |
| 1823 CMSAPI cmsBool CMSEXPORT cmsMLUsetUTF8(cmsContext ContextID, cmsMLU* mlu, | |
| 1824 const char LanguageCode[3], const char CountryCode[3], | |
| 1825 const char* UTF8String); | |
| 1826 | |
| 1827 CMSAPI cmsUInt32Number CMSEXPORT cmsMLUgetASCII(cmsContext ContextID, const cmsMLU* mlu, | |
| 1828 const char LanguageCode[3], const char CountryCode[3], | |
| 1829 char* Buffer, cmsUInt32Number BufferSize); | |
| 1830 | |
| 1831 CMSAPI cmsUInt32Number CMSEXPORT cmsMLUgetWide(cmsContext ContextID, const cmsMLU* mlu, | |
| 1832 const char LanguageCode[3], const char CountryCode[3], | |
| 1833 wchar_t* Buffer, cmsUInt32Number BufferSize); | |
| 1834 CMSAPI cmsUInt32Number CMSEXPORT cmsMLUgetUTF8(cmsContext ContextID, const cmsMLU* mlu, | |
| 1835 const char LanguageCode[3], const char CountryCode[3], | |
| 1836 char* Buffer, cmsUInt32Number BufferSize); | |
| 1837 | |
| 1838 | |
| 1839 CMSAPI cmsBool CMSEXPORT cmsMLUgetTranslation(cmsContext ContextID, const cmsMLU* mlu, | |
| 1840 const char LanguageCode[3], const char CountryCode[3], | |
| 1841 char ObtainedLanguage[3], char ObtainedCountry[3]); | |
| 1842 | |
| 1843 CMSAPI cmsUInt32Number CMSEXPORT cmsMLUtranslationsCount(cmsContext ContextID, const cmsMLU* mlu); | |
| 1844 | |
| 1845 CMSAPI cmsBool CMSEXPORT cmsMLUtranslationsCodes(cmsContext ContextID, const cmsMLU* mlu, | |
| 1846 cmsUInt32Number idx, | |
| 1847 char LanguageCode[3], | |
| 1848 char CountryCode[3]); | |
| 1849 | |
| 1850 // Undercolorremoval & black generation ------------------------------------------------------------------------------------- | |
| 1851 | |
| 1852 typedef struct { | |
| 1853 cmsToneCurve* Ucr; | |
| 1854 cmsToneCurve* Bg; | |
| 1855 cmsMLU* Desc; | |
| 1856 | |
| 1857 } cmsUcrBg; | |
| 1858 | |
| 1859 // Screening ---------------------------------------------------------------------------------------------------------------- | |
| 1860 | |
| 1861 #define cmsPRINTER_DEFAULT_SCREENS 0x0001 | |
| 1862 #define cmsFREQUENCE_UNITS_LINES_CM 0x0000 | |
| 1863 #define cmsFREQUENCE_UNITS_LINES_INCH 0x0002 | |
| 1864 | |
| 1865 #define cmsSPOT_UNKNOWN 0 | |
| 1866 #define cmsSPOT_PRINTER_DEFAULT 1 | |
| 1867 #define cmsSPOT_ROUND 2 | |
| 1868 #define cmsSPOT_DIAMOND 3 | |
| 1869 #define cmsSPOT_ELLIPSE 4 | |
| 1870 #define cmsSPOT_LINE 5 | |
| 1871 #define cmsSPOT_SQUARE 6 | |
| 1872 #define cmsSPOT_CROSS 7 | |
| 1873 | |
| 1874 typedef struct { | |
| 1875 cmsFloat64Number Frequency; | |
| 1876 cmsFloat64Number ScreenAngle; | |
| 1877 cmsUInt32Number SpotShape; | |
| 1878 | |
| 1879 } cmsScreeningChannel; | |
| 1880 | |
| 1881 typedef struct { | |
| 1882 cmsUInt32Number Flag; | |
| 1883 cmsUInt32Number nChannels; | |
| 1884 cmsScreeningChannel Channels[cmsMAXCHANNELS]; | |
| 1885 | |
| 1886 } cmsScreening; | |
| 1887 | |
| 1888 | |
| 1889 // Named color ----------------------------------------------------------------------------------------------------------------- | |
| 1890 | |
| 1891 typedef struct _cms_NAMEDCOLORLIST_struct cmsNAMEDCOLORLIST; | |
| 1892 | |
| 1893 CMSAPI cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, | |
| 1894 cmsUInt32Number n, | |
| 1895 cmsUInt32Number ColorantCount, | |
| 1896 const char* Prefix, const char* Suffix); | |
| 1897 | |
| 1898 CMSAPI void CMSEXPORT cmsFreeNamedColorList(cmsContext ContextID, cmsNAMEDCOLORLIST* v); | |
| 1899 CMSAPI cmsNAMEDCOLORLIST* CMSEXPORT cmsDupNamedColorList(cmsContext ContextID, const cmsNAMEDCOLORLIST* v); | |
| 1900 CMSAPI cmsBool CMSEXPORT cmsAppendNamedColor(cmsContext ContextID, cmsNAMEDCOLORLIST* v, const char* Name, | |
| 1901 cmsUInt16Number PCS[3], | |
| 1902 cmsUInt16Number Colorant[cmsMAXCHANNELS]); | |
| 1903 | |
| 1904 CMSAPI cmsUInt32Number CMSEXPORT cmsNamedColorCount(cmsContext ContextID, const cmsNAMEDCOLORLIST* v); | |
| 1905 CMSAPI cmsInt32Number CMSEXPORT cmsNamedColorIndex(cmsContext ContextID, const cmsNAMEDCOLORLIST* v, const char* Name); | |
| 1906 | |
| 1907 CMSAPI cmsBool CMSEXPORT cmsNamedColorInfo(cmsContext ContextID, | |
| 1908 const cmsNAMEDCOLORLIST* NamedColorList, cmsUInt32Number nColor, | |
| 1909 char* Name, | |
| 1910 char* Prefix, | |
| 1911 char* Suffix, | |
| 1912 cmsUInt16Number* PCS, | |
| 1913 cmsUInt16Number* Colorant); | |
| 1914 | |
| 1915 // Retrieve named color list from transform | |
| 1916 CMSAPI cmsNAMEDCOLORLIST* CMSEXPORT cmsGetNamedColorList(cmsHTRANSFORM xform); | |
| 1917 | |
| 1918 // Profile sequence ----------------------------------------------------------------------------------------------------- | |
| 1919 | |
| 1920 // Profile sequence descriptor. Some fields come from profile sequence descriptor tag, others | |
| 1921 // come from Profile Sequence Identifier Tag | |
| 1922 typedef struct { | |
| 1923 | |
| 1924 cmsSignature deviceMfg; | |
| 1925 cmsSignature deviceModel; | |
| 1926 cmsUInt64Number attributes; | |
| 1927 cmsTechnologySignature technology; | |
| 1928 cmsProfileID ProfileID; | |
| 1929 cmsMLU* Manufacturer; | |
| 1930 cmsMLU* Model; | |
| 1931 cmsMLU* Description; | |
| 1932 | |
| 1933 } cmsPSEQDESC; | |
| 1934 | |
| 1935 typedef struct { | |
| 1936 | |
| 1937 cmsUInt32Number n; | |
| 1938 cmsPSEQDESC* seq; | |
| 1939 | |
| 1940 } cmsSEQ; | |
| 1941 | |
| 1942 CMSAPI cmsSEQ* CMSEXPORT cmsAllocProfileSequenceDescription(cmsContext ContextID, cmsUInt32Number n); | |
| 1943 CMSAPI cmsSEQ* CMSEXPORT cmsDupProfileSequenceDescription(cmsContext ContextID, const cmsSEQ* pseq); | |
| 1944 CMSAPI void CMSEXPORT cmsFreeProfileSequenceDescription(cmsContext ContextID, cmsSEQ* pseq); | |
| 1945 | |
| 1946 // Dictionaries -------------------------------------------------------------------------------------------------------- | |
| 1947 | |
| 1948 typedef struct _cmsDICTentry_struct { | |
| 1949 | |
| 1950 struct _cmsDICTentry_struct* Next; | |
| 1951 | |
| 1952 cmsMLU *DisplayName; | |
| 1953 cmsMLU *DisplayValue; | |
| 1954 wchar_t* Name; | |
| 1955 wchar_t* Value; | |
| 1956 | |
| 1957 } cmsDICTentry; | |
| 1958 | |
| 1959 CMSAPI cmsHANDLE CMSEXPORT cmsDictAlloc(cmsContext ContextID); | |
| 1960 CMSAPI void CMSEXPORT cmsDictFree(cmsContext ContextID, cmsHANDLE hDict); | |
| 1961 CMSAPI cmsHANDLE CMSEXPORT cmsDictDup(cmsContext ContextID, cmsHANDLE hDict); | |
| 1962 | |
| 1963 CMSAPI cmsBool CMSEXPORT cmsDictAddEntry(cmsContext ContextID, cmsHANDLE hDict, const wchar_t* Name, const wchar_t* Value, const cmsMLU *DisplayName, const cmsMLU *DisplayValue); | |
| 1964 CMSAPI const cmsDICTentry* CMSEXPORT cmsDictGetEntryList(cmsContext ContextID, cmsHANDLE hDict); | |
| 1965 CMSAPI const cmsDICTentry* CMSEXPORT cmsDictNextEntry(cmsContext ContextID, const cmsDICTentry* e); | |
| 1966 | |
| 1967 // Access to Profile data ---------------------------------------------------------------------------------------------- | |
| 1968 CMSAPI cmsHPROFILE CMSEXPORT cmsCreateProfilePlaceholder(cmsContext ContextID); | |
| 1969 | |
| 1970 CMSAPI cmsInt32Number CMSEXPORT cmsGetTagCount(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 1971 CMSAPI cmsTagSignature CMSEXPORT cmsGetTagSignature(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number n); | |
| 1972 CMSAPI cmsBool CMSEXPORT cmsIsTag(cmsContext ContextID, cmsHPROFILE hProfile, cmsTagSignature sig); | |
| 1973 | |
| 1974 // Read and write pre-formatted data | |
| 1975 CMSAPI void* CMSEXPORT cmsReadTag(cmsContext ContextID, cmsHPROFILE hProfile, cmsTagSignature sig); | |
| 1976 CMSAPI cmsBool CMSEXPORT cmsWriteTag(cmsContext ContextID, cmsHPROFILE hProfile, cmsTagSignature sig, const void* data); | |
| 1977 CMSAPI cmsBool CMSEXPORT cmsLinkTag(cmsContext ContextID, cmsHPROFILE hProfile, cmsTagSignature sig, cmsTagSignature dest); | |
| 1978 CMSAPI cmsTagSignature CMSEXPORT cmsTagLinkedTo(cmsContext ContextID, cmsHPROFILE hProfile, cmsTagSignature sig); | |
| 1979 | |
| 1980 // Read and write raw data | |
| 1981 CMSAPI cmsUInt32Number CMSEXPORT cmsReadRawTag(cmsContext ContextID, cmsHPROFILE hProfile, cmsTagSignature sig, void* Buffer, cmsUInt32Number BufferSize); | |
| 1982 CMSAPI cmsBool CMSEXPORT cmsWriteRawTag(cmsContext ContextID, cmsHPROFILE hProfile, cmsTagSignature sig, const void* data, cmsUInt32Number Size); | |
| 1983 | |
| 1984 // Access header data | |
| 1985 #define cmsEmbeddedProfileFalse 0x00000000 | |
| 1986 #define cmsEmbeddedProfileTrue 0x00000001 | |
| 1987 #define cmsUseAnywhere 0x00000000 | |
| 1988 #define cmsUseWithEmbeddedDataOnly 0x00000002 | |
| 1989 | |
| 1990 CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderFlags(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 1991 CMSAPI void CMSEXPORT cmsGetHeaderAttributes(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt64Number* Flags); | |
| 1992 CMSAPI void CMSEXPORT cmsGetHeaderProfileID(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt8Number* ProfileID); | |
| 1993 CMSAPI cmsBool CMSEXPORT cmsGetHeaderCreationDateTime(cmsContext ContextID, cmsHPROFILE hProfile, struct tm *Dest); | |
| 1994 CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderRenderingIntent(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 1995 | |
| 1996 CMSAPI void CMSEXPORT cmsSetHeaderFlags(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number Flags); | |
| 1997 CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderManufacturer(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 1998 CMSAPI void CMSEXPORT cmsSetHeaderManufacturer(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number manufacturer); | |
| 1999 CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderCreator(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 2000 CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderModel(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 2001 CMSAPI void CMSEXPORT cmsSetHeaderModel(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number model); | |
| 2002 CMSAPI void CMSEXPORT cmsSetHeaderAttributes(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt64Number Flags); | |
| 2003 CMSAPI void CMSEXPORT cmsSetHeaderProfileID(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt8Number* ProfileID); | |
| 2004 CMSAPI void CMSEXPORT cmsSetHeaderRenderingIntent(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number RenderingIntent); | |
| 2005 | |
| 2006 CMSAPI cmsColorSpaceSignature | |
| 2007 CMSEXPORT cmsGetPCS(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 2008 CMSAPI void CMSEXPORT cmsSetPCS(cmsContext ContextID, cmsHPROFILE hProfile, cmsColorSpaceSignature pcs); | |
| 2009 CMSAPI cmsColorSpaceSignature | |
| 2010 CMSEXPORT cmsGetColorSpace(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 2011 CMSAPI void CMSEXPORT cmsSetColorSpace(cmsContext ContextID, cmsHPROFILE hProfile, cmsColorSpaceSignature sig); | |
| 2012 CMSAPI cmsProfileClassSignature | |
| 2013 CMSEXPORT cmsGetDeviceClass(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 2014 CMSAPI void CMSEXPORT cmsSetDeviceClass(cmsContext ContextID, cmsHPROFILE hProfile, cmsProfileClassSignature sig); | |
| 2015 CMSAPI void CMSEXPORT cmsSetProfileVersion(cmsContext ContextID, cmsHPROFILE hProfile, cmsFloat64Number Version); | |
| 2016 CMSAPI cmsFloat64Number CMSEXPORT cmsGetProfileVersion(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 2017 | |
| 2018 CMSAPI cmsUInt32Number CMSEXPORT cmsGetEncodedICCversion(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 2019 CMSAPI void CMSEXPORT cmsSetEncodedICCversion(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number Version); | |
| 2020 | |
| 2021 // How profiles may be used | |
| 2022 #define LCMS_USED_AS_INPUT 0 | |
| 2023 #define LCMS_USED_AS_OUTPUT 1 | |
| 2024 #define LCMS_USED_AS_PROOF 2 | |
| 2025 | |
| 2026 CMSAPI cmsBool CMSEXPORT cmsIsIntentSupported(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number UsedDirection); | |
| 2027 CMSAPI cmsBool CMSEXPORT cmsIsMatrixShaper(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 2028 CMSAPI cmsBool CMSEXPORT cmsIsCLUT(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number UsedDirection); | |
| 2029 | |
| 2030 // Translate form/to our notation to ICC | |
| 2031 CMSAPI cmsColorSpaceSignature CMSEXPORT _cmsICCcolorSpace(cmsContext ContextID, int OurNotation); | |
| 2032 CMSAPI int CMSEXPORT _cmsLCMScolorSpace(cmsContext ContextID, cmsColorSpaceSignature ProfileSpace); | |
| 2033 | |
| 2034 // Deprecated, use cmsChannelsOfColorSpace instead | |
| 2035 CMSAPI cmsUInt32Number CMSEXPORT cmsChannelsOf(cmsContext ContextID, cmsColorSpaceSignature ColorSpace); | |
| 2036 | |
| 2037 // Get number of channels of color space or -1 if color space is not listed/supported | |
| 2038 CMSAPI cmsInt32Number CMSEXPORT cmsChannelsOfColorSpace(cmsContext ContextID, cmsColorSpaceSignature ColorSpace); | |
| 2039 | |
| 2040 // Build a suitable formatter for the colorspace of this profile. nBytes=1 means 8 bits, nBytes=2 means 16 bits. | |
| 2041 CMSAPI cmsUInt32Number CMSEXPORT cmsFormatterForColorspaceOfProfile(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number nBytes, cmsBool lIsFloat); | |
| 2042 CMSAPI cmsUInt32Number CMSEXPORT cmsFormatterForPCSOfProfile(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number nBytes, cmsBool lIsFloat); | |
| 2043 | |
| 2044 | |
| 2045 // Localized info | |
| 2046 typedef enum { | |
| 2047 cmsInfoDescription = 0, | |
| 2048 cmsInfoManufacturer = 1, | |
| 2049 cmsInfoModel = 2, | |
| 2050 cmsInfoCopyright = 3 | |
| 2051 } cmsInfoType; | |
| 2052 | |
| 2053 CMSAPI cmsUInt32Number CMSEXPORT cmsGetProfileInfo(cmsContext ContextID, cmsHPROFILE hProfile, cmsInfoType Info, | |
| 2054 const char LanguageCode[3], const char CountryCode[3], | |
| 2055 wchar_t* Buffer, cmsUInt32Number BufferSize); | |
| 2056 | |
| 2057 CMSAPI cmsUInt32Number CMSEXPORT cmsGetProfileInfoASCII(cmsContext ContextID, cmsHPROFILE hProfile, cmsInfoType Info, | |
| 2058 const char LanguageCode[3], const char CountryCode[3], | |
| 2059 char* Buffer, cmsUInt32Number BufferSize); | |
| 2060 | |
| 2061 CMSAPI cmsUInt32Number CMSEXPORT cmsGetProfileInfoUTF8(cmsContext ContextID, cmsHPROFILE hProfile, cmsInfoType Info, | |
| 2062 const char LanguageCode[3], const char CountryCode[3], | |
| 2063 char* Buffer, cmsUInt32Number BufferSize); | |
| 2064 | |
| 2065 // IO handlers ---------------------------------------------------------------------------------------------------------- | |
| 2066 | |
| 2067 typedef struct _cms_io_handler cmsIOHANDLER; | |
| 2068 | |
| 2069 CMSAPI cmsIOHANDLER* CMSEXPORT cmsOpenIOhandlerFromFile(cmsContext ContextID, const char* FileName, const char* AccessMode); | |
| 2070 CMSAPI cmsIOHANDLER* CMSEXPORT cmsOpenIOhandlerFromStream(cmsContext ContextID, FILE* Stream); | |
| 2071 CMSAPI cmsIOHANDLER* CMSEXPORT cmsOpenIOhandlerFromMem(cmsContext ContextID, void *Buffer, cmsUInt32Number size, const char* AccessMode); | |
| 2072 CMSAPI cmsIOHANDLER* CMSEXPORT cmsOpenIOhandlerFromNULL(cmsContext ContextID); | |
| 2073 CMSAPI cmsIOHANDLER* CMSEXPORT cmsGetProfileIOhandler(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 2074 CMSAPI cmsBool CMSEXPORT cmsCloseIOhandler(cmsContext ContextID, cmsIOHANDLER* io); | |
| 2075 | |
| 2076 // MD5 message digest -------------------------------------------------------------------------------------------------- | |
| 2077 | |
| 2078 CMSAPI cmsBool CMSEXPORT cmsMD5computeID(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 2079 | |
| 2080 // Profile high level functions ------------------------------------------------------------------------------------------ | |
| 2081 | |
| 2082 CMSAPI cmsHPROFILE CMSEXPORT cmsOpenProfileFromFile(cmsContext ContextID, const char *ICCProfile, const char *sAccess); | |
| 2083 CMSAPI cmsHPROFILE CMSEXPORT cmsOpenProfileFromStream(cmsContext ContextID, FILE* ICCProfile, const char* sAccess); | |
| 2084 CMSAPI cmsHPROFILE CMSEXPORT cmsOpenProfileFromMem(cmsContext ContextID, const void * MemPtr, cmsUInt32Number dwSize); | |
| 2085 CMSAPI cmsHPROFILE CMSEXPORT cmsOpenProfileFromIOhandler(cmsContext ContextID, cmsIOHANDLER* io); | |
| 2086 CMSAPI cmsHPROFILE CMSEXPORT cmsOpenProfileFromIOhandler2(cmsContext ContextID, cmsIOHANDLER* io, cmsBool write); | |
| 2087 CMSAPI cmsBool CMSEXPORT cmsCloseProfile(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 2088 | |
| 2089 CMSAPI cmsBool CMSEXPORT cmsSaveProfileToFile(cmsContext ContextID, cmsHPROFILE hProfile, const char* FileName); | |
| 2090 CMSAPI cmsBool CMSEXPORT cmsSaveProfileToStream(cmsContext ContextID, cmsHPROFILE hProfile, FILE* Stream); | |
| 2091 CMSAPI cmsBool CMSEXPORT cmsSaveProfileToMem(cmsContext ContextID, cmsHPROFILE hProfile, void *MemPtr, cmsUInt32Number* BytesNeeded); | |
| 2092 CMSAPI cmsUInt32Number CMSEXPORT cmsSaveProfileToIOhandler(cmsContext ContextID, cmsHPROFILE hProfile, cmsIOHANDLER* io); | |
| 2093 | |
| 2094 // Predefined virtual profiles ------------------------------------------------------------------------------------------ | |
| 2095 | |
| 2096 CMSAPI cmsHPROFILE CMSEXPORT cmsCreateRGBProfile(cmsContext ContextID, | |
| 2097 const cmsCIExyY* WhitePoint, | |
| 2098 const cmsCIExyYTRIPLE* Primaries, | |
| 2099 cmsToneCurve* const TransferFunction[3]); | |
| 2100 | |
| 2101 CMSAPI cmsHPROFILE CMSEXPORT cmsCreateGrayProfile(cmsContext ContextID, | |
| 2102 const cmsCIExyY* WhitePoint, | |
| 2103 const cmsToneCurve* TransferFunction); | |
| 2104 | |
| 2105 CMSAPI cmsHPROFILE CMSEXPORT cmsCreateLinearizationDeviceLink(cmsContext ContextID, | |
| 2106 cmsColorSpaceSignature ColorSpace, | |
| 2107 cmsToneCurve* const TransferFunctions[]); | |
| 2108 | |
| 2109 CMSAPI cmsHPROFILE CMSEXPORT cmsCreateInkLimitingDeviceLink(cmsContext ContextID, | |
| 2110 cmsColorSpaceSignature ColorSpace, | |
| 2111 cmsFloat64Number Limit); | |
| 2112 | |
| 2113 CMSAPI cmsHPROFILE CMSEXPORT cmsCreateLab2Profile(cmsContext ContextID, | |
| 2114 const cmsCIExyY* WhitePoint); | |
| 2115 CMSAPI cmsHPROFILE CMSEXPORT cmsCreateLab4Profile(cmsContext ContextID, | |
| 2116 const cmsCIExyY* WhitePoint); | |
| 2117 | |
| 2118 CMSAPI cmsHPROFILE CMSEXPORT cmsCreateXYZProfile(cmsContext ContextID); | |
| 2119 | |
| 2120 CMSAPI cmsHPROFILE CMSEXPORT cmsCreate_sRGBProfile(cmsContext ContextID); | |
| 2121 | |
| 2122 CMSAPI cmsHPROFILE CMSEXPORT cmsCreateBCHSWabstractProfile(cmsContext ContextID, | |
| 2123 cmsUInt32Number nLUTPoints, | |
| 2124 cmsFloat64Number Bright, | |
| 2125 cmsFloat64Number Contrast, | |
| 2126 cmsFloat64Number Hue, | |
| 2127 cmsFloat64Number Saturation, | |
| 2128 cmsUInt32Number TempSrc, | |
| 2129 cmsUInt32Number TempDest); | |
| 2130 | |
| 2131 CMSAPI cmsHPROFILE CMSEXPORT cmsCreateDeviceLinkFromCubeFile(cmsContext ContextID, const char* cFileName); | |
| 2132 | |
| 2133 CMSAPI cmsHPROFILE CMSEXPORT cmsCreateLab2Profile(cmsContext ContextID, const cmsCIExyY* WhitePoint); | |
| 2134 CMSAPI cmsHPROFILE CMSEXPORT cmsCreateLab4Profile(cmsContext ContextID, const cmsCIExyY* WhitePoint); | |
| 2135 | |
| 2136 CMSAPI cmsHPROFILE CMSEXPORT cmsCreateXYZProfile(cmsContext ContextID); | |
| 2137 | |
| 2138 CMSAPI cmsHPROFILE CMSEXPORT cmsCreate_sRGBProfile(cmsContext ContextID); | |
| 2139 | |
| 2140 CMSAPI cmsHPROFILE CMSEXPORT cmsCreate_OkLabProfile(cmsContext ctx); | |
| 2141 | |
| 2142 CMSAPI cmsHPROFILE CMSEXPORT cmsCreateBCHSWabstractProfile(cmsContext ContextID, | |
| 2143 cmsUInt32Number nLUTPoints, | |
| 2144 cmsFloat64Number Bright, | |
| 2145 cmsFloat64Number Contrast, | |
| 2146 cmsFloat64Number Hue, | |
| 2147 cmsFloat64Number Saturation, | |
| 2148 cmsUInt32Number TempSrc, | |
| 2149 cmsUInt32Number TempDest); | |
| 2150 | |
| 2151 CMSAPI cmsHPROFILE CMSEXPORT cmsCreateNULLProfile(cmsContext ContextID); | |
| 2152 | |
| 2153 // Converts a transform to a devicelink profile | |
| 2154 CMSAPI cmsHPROFILE CMSEXPORT cmsTransform2DeviceLink(cmsContext ContextID, | |
| 2155 cmsHTRANSFORM hTransform, | |
| 2156 cmsFloat64Number Version, | |
| 2157 cmsUInt32Number dwFlags); | |
| 2158 | |
| 2159 // Intents ---------------------------------------------------------------------------------------------- | |
| 2160 | |
| 2161 // ICC Intents | |
| 2162 #define INTENT_PERCEPTUAL 0 | |
| 2163 #define INTENT_RELATIVE_COLORIMETRIC 1 | |
| 2164 #define INTENT_SATURATION 2 | |
| 2165 #define INTENT_ABSOLUTE_COLORIMETRIC 3 | |
| 2166 | |
| 2167 // Non-ICC intents | |
| 2168 #define INTENT_PRESERVE_K_ONLY_PERCEPTUAL 10 | |
| 2169 #define INTENT_PRESERVE_K_ONLY_RELATIVE_COLORIMETRIC 11 | |
| 2170 #define INTENT_PRESERVE_K_ONLY_SATURATION 12 | |
| 2171 #define INTENT_PRESERVE_K_PLANE_PERCEPTUAL 13 | |
| 2172 #define INTENT_PRESERVE_K_PLANE_RELATIVE_COLORIMETRIC 14 | |
| 2173 #define INTENT_PRESERVE_K_PLANE_SATURATION 15 | |
| 2174 | |
| 2175 // Call with NULL as parameters to get the intent count | |
| 2176 CMSAPI cmsUInt32Number CMSEXPORT cmsGetSupportedIntents(cmsContext ContextID, | |
| 2177 cmsUInt32Number nMax, | |
| 2178 cmsUInt32Number* Codes, | |
| 2179 char** Descriptions); | |
| 2180 | |
| 2181 // Flags | |
| 2182 | |
| 2183 #define cmsFLAGS_NOCACHE 0x0040 // Inhibit 1-pixel cache | |
| 2184 #define cmsFLAGS_NOOPTIMIZE 0x0100 // Inhibit optimizations | |
| 2185 #define cmsFLAGS_NULLTRANSFORM 0x0200 // Don't transform anyway | |
| 2186 | |
| 2187 // Proofing flags | |
| 2188 #define cmsFLAGS_GAMUTCHECK 0x1000 // Out of Gamut alarm | |
| 2189 #define cmsFLAGS_SOFTPROOFING 0x4000 // Do softproofing | |
| 2190 | |
| 2191 // Misc | |
| 2192 #define cmsFLAGS_BLACKPOINTCOMPENSATION 0x2000 | |
| 2193 #define cmsFLAGS_NOWHITEONWHITEFIXUP 0x0004 // Don't fix scum dot | |
| 2194 #define cmsFLAGS_HIGHRESPRECALC 0x0400 // Use more memory to give better accuracy | |
| 2195 #define cmsFLAGS_LOWRESPRECALC 0x0800 // Use less memory to minimize resources | |
| 2196 | |
| 2197 // For devicelink creation | |
| 2198 #define cmsFLAGS_8BITS_DEVICELINK 0x0008 // Create 8 bits devicelinks | |
| 2199 #define cmsFLAGS_GUESSDEVICECLASS 0x0020 // Guess device class (for transform2devicelink) | |
| 2200 #define cmsFLAGS_KEEP_SEQUENCE 0x0080 // Keep profile sequence for devicelink creation | |
| 2201 | |
| 2202 // Specific to a particular optimizations | |
| 2203 #define cmsFLAGS_FORCE_CLUT 0x0002 // Force CLUT optimization | |
| 2204 #define cmsFLAGS_CLUT_POST_LINEARIZATION 0x0001 // create postlinearization tables if possible | |
| 2205 #define cmsFLAGS_CLUT_PRE_LINEARIZATION 0x0010 // create prelinearization tables if possible | |
| 2206 | |
| 2207 // Specific to unbounded mode | |
| 2208 #define cmsFLAGS_NONEGATIVES 0x8000 // Prevent negative numbers in floating point transforms | |
| 2209 | |
| 2210 // Copy alpha channels when transforming | |
| 2211 #define cmsFLAGS_COPY_ALPHA 0x04000000 // Alpha channels are copied on cmsDoTransform() | |
| 2212 | |
| 2213 // Unpremultiply/premultiply by final alpha value when transforming | |
| 2214 #define cmsFLAGS_PREMULT 0x08000000 // Data is multiplied by final alpha channel on cmsDoTransform() | |
| 2215 | |
| 2216 // Fine-tune control over number of gridpoints | |
| 2217 #define cmsFLAGS_GRIDPOINTS(n) (((n) & 0xFF) << 16) | |
| 2218 | |
| 2219 // CRD special | |
| 2220 #define cmsFLAGS_NODEFAULTRESOURCEDEF 0x01000000 | |
| 2221 | |
| 2222 // Transforms --------------------------------------------------------------------------------------------------- | |
| 2223 | |
| 2224 CMSAPI cmsHTRANSFORM CMSEXPORT cmsCreateTransform(cmsContext ContextID, | |
| 2225 cmsHPROFILE Input, | |
| 2226 cmsUInt32Number InputFormat, | |
| 2227 cmsHPROFILE Output, | |
| 2228 cmsUInt32Number OutputFormat, | |
| 2229 cmsUInt32Number Intent, | |
| 2230 cmsUInt32Number dwFlags); | |
| 2231 | |
| 2232 CMSAPI cmsHTRANSFORM CMSEXPORT cmsCreateProofingTransform(cmsContext ContextID, | |
| 2233 cmsHPROFILE Input, | |
| 2234 cmsUInt32Number InputFormat, | |
| 2235 cmsHPROFILE Output, | |
| 2236 cmsUInt32Number OutputFormat, | |
| 2237 cmsHPROFILE Proofing, | |
| 2238 cmsUInt32Number Intent, | |
| 2239 cmsUInt32Number ProofingIntent, | |
| 2240 cmsUInt32Number dwFlags); | |
| 2241 | |
| 2242 CMSAPI cmsHTRANSFORM CMSEXPORT cmsCreateMultiprofileTransform(cmsContext ContextID, | |
| 2243 cmsHPROFILE hProfiles[], | |
| 2244 cmsUInt32Number nProfiles, | |
| 2245 cmsUInt32Number InputFormat, | |
| 2246 cmsUInt32Number OutputFormat, | |
| 2247 cmsUInt32Number Intent, | |
| 2248 cmsUInt32Number dwFlags); | |
| 2249 | |
| 2250 | |
| 2251 CMSAPI cmsHTRANSFORM CMSEXPORT cmsCreateExtendedTransform(cmsContext ContextID, | |
| 2252 cmsUInt32Number nProfiles, cmsHPROFILE hProfiles[], | |
| 2253 cmsBool BPC[], | |
| 2254 cmsUInt32Number Intents[], | |
| 2255 cmsFloat64Number AdaptationStates[], | |
| 2256 cmsHPROFILE hGamutProfile, | |
| 2257 cmsUInt32Number nGamutPCSposition, | |
| 2258 cmsUInt32Number InputFormat, | |
| 2259 cmsUInt32Number OutputFormat, | |
| 2260 cmsUInt32Number dwFlags); | |
| 2261 | |
| 2262 CMSAPI void CMSEXPORT cmsDeleteTransform(cmsContext ContextID, cmsHTRANSFORM hTransform); | |
| 2263 | |
| 2264 CMSAPI void CMSEXPORT cmsDoTransform(cmsContext ContextID, | |
| 2265 cmsHTRANSFORM Transform, | |
| 2266 const void * InputBuffer, | |
| 2267 void * OutputBuffer, | |
| 2268 cmsUInt32Number Size); | |
| 2269 | |
| 2270 CMSAPI void CMSEXPORT cmsDoTransformStride(cmsContext ContextID, // Deprecated | |
| 2271 cmsHTRANSFORM Transform, | |
| 2272 const void * InputBuffer, | |
| 2273 void * OutputBuffer, | |
| 2274 cmsUInt32Number Size, | |
| 2275 cmsUInt32Number Stride); | |
| 2276 | |
| 2277 CMSAPI void CMSEXPORT cmsDoTransformLineStride(cmsContext ContextID, | |
| 2278 cmsHTRANSFORM Transform, | |
| 2279 const void* InputBuffer, | |
| 2280 void* OutputBuffer, | |
| 2281 cmsUInt32Number PixelsPerLine, | |
| 2282 cmsUInt32Number LineCount, | |
| 2283 cmsUInt32Number BytesPerLineIn, | |
| 2284 cmsUInt32Number BytesPerLineOut, | |
| 2285 cmsUInt32Number BytesPerPlaneIn, | |
| 2286 cmsUInt32Number BytesPerPlaneOut); | |
| 2287 | |
| 2288 | |
| 2289 CMSAPI void CMSEXPORT cmsSetAlarmCodes(cmsContext ContextID, | |
| 2290 const cmsUInt16Number AlarmCodes[cmsMAXCHANNELS]); | |
| 2291 CMSAPI void CMSEXPORT cmsGetAlarmCodes(cmsContext ContextID, | |
| 2292 cmsUInt16Number AlarmCodes[cmsMAXCHANNELS]); | |
| 2293 | |
| 2294 | |
| 2295 | |
| 2296 // Adaptation state for absolute colorimetric intent | |
| 2297 CMSAPI cmsFloat64Number CMSEXPORT cmsSetAdaptationState(cmsContext ContextID, cmsFloat64Number d); | |
| 2298 | |
| 2299 | |
| 2300 // Grab the input/output formats | |
| 2301 CMSAPI cmsUInt32Number CMSEXPORT cmsGetTransformInputFormat(cmsContext ContextID, cmsHTRANSFORM hTransform); | |
| 2302 CMSAPI cmsUInt32Number CMSEXPORT cmsGetTransformOutputFormat(cmsContext ContextID, cmsHTRANSFORM hTransform); | |
| 2303 | |
| 2304 cmsHTRANSFORM cmsCloneTransformChangingFormats(cmsContext ContextID, | |
| 2305 const cmsHTRANSFORM hTransform, | |
| 2306 cmsUInt32Number InputFormat, | |
| 2307 cmsUInt32Number OutputFormat); | |
| 2308 | |
| 2309 | |
| 2310 // PostScript ColorRenderingDictionary and ColorSpaceArray ---------------------------------------------------- | |
| 2311 | |
| 2312 typedef enum { cmsPS_RESOURCE_CSA, cmsPS_RESOURCE_CRD } cmsPSResourceType; | |
| 2313 | |
| 2314 // lcms2 unified method to access postscript color resources | |
| 2315 CMSAPI cmsUInt32Number CMSEXPORT cmsGetPostScriptColorResource(cmsContext ContextID, | |
| 2316 cmsPSResourceType Type, | |
| 2317 cmsHPROFILE hProfile, | |
| 2318 cmsUInt32Number Intent, | |
| 2319 cmsUInt32Number dwFlags, | |
| 2320 cmsIOHANDLER* io); | |
| 2321 | |
| 2322 CMSAPI cmsUInt32Number CMSEXPORT cmsGetPostScriptCSA(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags, void* Buffer, cmsUInt32Number dwBufferLen); | |
| 2323 CMSAPI cmsUInt32Number CMSEXPORT cmsGetPostScriptCRD(cmsContext ContextID, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags, void* Buffer, cmsUInt32Number dwBufferLen); | |
| 2324 | |
| 2325 | |
| 2326 // IT8.7 / CGATS.17-200x handling ----------------------------------------------------------------------------- | |
| 2327 | |
| 2328 CMSAPI cmsHANDLE CMSEXPORT cmsIT8Alloc(cmsContext ContextID); | |
| 2329 CMSAPI void CMSEXPORT cmsIT8Free(cmsContext ContextID, cmsHANDLE hIT8); | |
| 2330 | |
| 2331 // Tables | |
| 2332 CMSAPI cmsUInt32Number CMSEXPORT cmsIT8TableCount(cmsContext ContextID, cmsHANDLE hIT8); | |
| 2333 CMSAPI cmsInt32Number CMSEXPORT cmsIT8SetTable(cmsContext ContextID, cmsHANDLE hIT8, cmsUInt32Number nTable); | |
| 2334 | |
| 2335 // Persistence | |
| 2336 CMSAPI cmsHANDLE CMSEXPORT cmsIT8LoadFromFile(cmsContext ContextID, const char* cFileName); | |
| 2337 CMSAPI cmsHANDLE CMSEXPORT cmsIT8LoadFromMem(cmsContext ContextID, const void *Ptr, cmsUInt32Number len); | |
| 2338 // CMSAPI cmsHANDLE CMSEXPORT cmsIT8LoadFromIOhandler(cmsContext ContextID, cmsIOHANDLER* io); | |
| 2339 | |
| 2340 CMSAPI cmsBool CMSEXPORT cmsIT8SaveToFile(cmsContext ContextID, cmsHANDLE hIT8, const char* cFileName); | |
| 2341 CMSAPI cmsBool CMSEXPORT cmsIT8SaveToMem(cmsContext ContextID, cmsHANDLE hIT8, void *MemPtr, cmsUInt32Number* BytesNeeded); | |
| 2342 | |
| 2343 // Properties | |
| 2344 CMSAPI const char* CMSEXPORT cmsIT8GetSheetType(cmsContext ContextID, cmsHANDLE hIT8); | |
| 2345 CMSAPI cmsBool CMSEXPORT cmsIT8SetSheetType(cmsContext ContextID, cmsHANDLE hIT8, const char* Type); | |
| 2346 | |
| 2347 CMSAPI cmsBool CMSEXPORT cmsIT8SetComment(cmsContext ContextID, cmsHANDLE hIT8, const char* cComment); | |
| 2348 | |
| 2349 CMSAPI cmsBool CMSEXPORT cmsIT8SetPropertyStr(cmsContext ContextID, cmsHANDLE hIT8, const char* cProp, const char *Str); | |
| 2350 CMSAPI cmsBool CMSEXPORT cmsIT8SetPropertyDbl(cmsContext ContextID, cmsHANDLE hIT8, const char* cProp, cmsFloat64Number Val); | |
| 2351 CMSAPI cmsBool CMSEXPORT cmsIT8SetPropertyHex(cmsContext ContextID, cmsHANDLE hIT8, const char* cProp, cmsUInt32Number Val); | |
| 2352 CMSAPI cmsBool CMSEXPORT cmsIT8SetPropertyMulti(cmsContext ContextID, cmsHANDLE hIT8, const char* Key, const char* SubKey, const char *Buffer); | |
| 2353 CMSAPI cmsBool CMSEXPORT cmsIT8SetPropertyUncooked(cmsContext ContextID, cmsHANDLE hIT8, const char* Key, const char* Buffer); | |
| 2354 | |
| 2355 | |
| 2356 CMSAPI const char* CMSEXPORT cmsIT8GetProperty(cmsContext ContextID, cmsHANDLE hIT8, const char* cProp); | |
| 2357 CMSAPI cmsFloat64Number CMSEXPORT cmsIT8GetPropertyDbl(cmsContext ContextID, cmsHANDLE hIT8, const char* cProp); | |
| 2358 CMSAPI const char* CMSEXPORT cmsIT8GetPropertyMulti(cmsContext ContextID, cmsHANDLE hIT8, const char* Key, const char *SubKey); | |
| 2359 CMSAPI cmsUInt32Number CMSEXPORT cmsIT8EnumProperties(cmsContext ContextID, cmsHANDLE hIT8, char ***PropertyNames); | |
| 2360 CMSAPI cmsUInt32Number CMSEXPORT cmsIT8EnumPropertyMulti(cmsContext ContextID, cmsHANDLE hIT8, const char* cProp, const char ***SubpropertyNames); | |
| 2361 | |
| 2362 // Datasets | |
| 2363 CMSAPI const char* CMSEXPORT cmsIT8GetDataRowCol(cmsContext ContextID, cmsHANDLE hIT8, int row, int col); | |
| 2364 CMSAPI cmsFloat64Number CMSEXPORT cmsIT8GetDataRowColDbl(cmsContext ContextID, cmsHANDLE hIT8, int row, int col); | |
| 2365 | |
| 2366 CMSAPI cmsBool CMSEXPORT cmsIT8SetDataRowCol(cmsContext ContextID, cmsHANDLE hIT8, int row, int col, | |
| 2367 const char* Val); | |
| 2368 | |
| 2369 CMSAPI cmsBool CMSEXPORT cmsIT8SetDataRowColDbl(cmsContext ContextID, cmsHANDLE hIT8, int row, int col, | |
| 2370 cmsFloat64Number Val); | |
| 2371 | |
| 2372 CMSAPI const char* CMSEXPORT cmsIT8GetData(cmsContext ContextID, cmsHANDLE hIT8, const char* cPatch, const char* cSample); | |
| 2373 | |
| 2374 | |
| 2375 CMSAPI cmsFloat64Number CMSEXPORT cmsIT8GetDataDbl(cmsContext ContextID, cmsHANDLE hIT8, const char* cPatch, const char* cSample); | |
| 2376 | |
| 2377 CMSAPI cmsBool CMSEXPORT cmsIT8SetData(cmsContext ContextID, cmsHANDLE hIT8, const char* cPatch, | |
| 2378 const char* cSample, | |
| 2379 const char *Val); | |
| 2380 | |
| 2381 CMSAPI cmsBool CMSEXPORT cmsIT8SetDataDbl(cmsContext ContextID, cmsHANDLE hIT8, const char* cPatch, | |
| 2382 const char* cSample, | |
| 2383 cmsFloat64Number Val); | |
| 2384 | |
| 2385 CMSAPI int CMSEXPORT cmsIT8FindDataFormat(cmsContext ContextID, cmsHANDLE hIT8, const char* cSample); | |
| 2386 CMSAPI cmsBool CMSEXPORT cmsIT8SetDataFormat(cmsContext ContextID, cmsHANDLE hIT8, int n, const char *Sample); | |
| 2387 CMSAPI int CMSEXPORT cmsIT8EnumDataFormat(cmsContext ContextID, cmsHANDLE hIT8, char ***SampleNames); | |
| 2388 | |
| 2389 CMSAPI const char* CMSEXPORT cmsIT8GetPatchName(cmsContext ContextID, cmsHANDLE hIT8, int nPatch, char* buffer); | |
| 2390 CMSAPI int CMSEXPORT cmsIT8GetPatchByName(cmsContext ContextID, cmsHANDLE hIT8, const char *cPatch); | |
| 2391 | |
| 2392 // The LABEL extension | |
| 2393 CMSAPI int CMSEXPORT cmsIT8SetTableByLabel(cmsContext ContextID, cmsHANDLE hIT8, const char* cSet, const char* cField, const char* ExpectedType); | |
| 2394 | |
| 2395 CMSAPI cmsBool CMSEXPORT cmsIT8SetIndexColumn(cmsContext ContextID, cmsHANDLE hIT8, const char* cSample); | |
| 2396 | |
| 2397 // Formatter for double | |
| 2398 CMSAPI void CMSEXPORT cmsIT8DefineDblFormat(cmsContext ContextID, cmsHANDLE hIT8, const char* Formatter); | |
| 2399 | |
| 2400 // Gamut boundary description routines ------------------------------------------------------------------------------ | |
| 2401 | |
| 2402 CMSAPI cmsHANDLE CMSEXPORT cmsGBDAlloc(cmsContext ContextID); | |
| 2403 CMSAPI void CMSEXPORT cmsGBDFree(cmsContext ContextID, cmsHANDLE hGBD); | |
| 2404 CMSAPI cmsBool CMSEXPORT cmsGDBAddPoint(cmsContext ContextID, cmsHANDLE hGBD, const cmsCIELab* Lab); | |
| 2405 CMSAPI cmsBool CMSEXPORT cmsGDBCompute(cmsContext ContextID, cmsHANDLE hGDB, cmsUInt32Number dwFlags); | |
| 2406 CMSAPI cmsBool CMSEXPORT cmsGDBCheckPoint(cmsContext ContextID, cmsHANDLE hGBD, const cmsCIELab* Lab); | |
| 2407 | |
| 2408 // Feature detection ---------------------------------------------------------------------------------------------- | |
| 2409 | |
| 2410 // Estimate the black point | |
| 2411 CMSAPI cmsBool CMSEXPORT cmsDetectBlackPoint(cmsContext ContextID, cmsCIEXYZ* BlackPoint, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags); | |
| 2412 CMSAPI cmsBool CMSEXPORT cmsDetectDestinationBlackPoint(cmsContext ContextID, cmsCIEXYZ* BlackPoint, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags); | |
| 2413 | |
| 2414 // Estimate total area coverage | |
| 2415 CMSAPI cmsFloat64Number CMSEXPORT cmsDetectTAC(cmsContext ContextID, cmsHPROFILE hProfile); | |
| 2416 | |
| 2417 // Estimate gamma space, always positive. Returns -1 on error. | |
| 2418 CMSAPI cmsFloat64Number CMSEXPORT cmsDetectRGBProfileGamma(cmsContext ContextID, cmsHPROFILE hProfile, cmsFloat64Number thereshold); | |
| 2419 | |
| 2420 // Poor man's gamut mapping | |
| 2421 CMSAPI cmsBool CMSEXPORT cmsDesaturateLab(cmsContext ContextID, cmsCIELab* Lab, | |
| 2422 double amax, double amin, | |
| 2423 double bmax, double bmin); | |
| 2424 | |
| 2425 #ifndef CMS_USE_CPP_API | |
| 2426 # ifdef __cplusplus | |
| 2427 } | |
| 2428 # endif | |
| 2429 #endif | |
| 2430 | |
| 2431 #define _lcms2mt_H | |
| 2432 #endif |
