1 /** @file 2 File: icProfileHeader.h 3 4 Contains: ICC profile definitions and structures including Version 4 extensions 5 6 Copyright: � see ICC Software License 7 8 * <b> 9 * This version of the header file corresponds to the profile 10 * specification version 4.2 as defined in ICC Specificion ICC.1:2004-04. 11 * 12 * Some definitions only provided by version 2.x profiles are also included. 13 * 14 * This header file should not be considered as a replacement for the ICC 15 * profile specification. The ICC profile specification should always be 16 * considered the ULTIMATE authority related to the specifiation for 17 * contents in ICC profile file. Conflicts between this header file 18 * and the ICC profile specification (if they exist) should be deferred 19 * to the ICC profile specification. 20 * </b> 21 * 22 * All header file entries are pre-fixed with "ic" to help 23 * avoid name space collisions. Signatures are pre-fixed with 24 * icSig. 25 * 26 * Note: This header assumes that int is at least a 32 bit quantity 27 * 28 * The structures defined in this header file were created to 29 * represent a description of an ICC profile on disk. Rather 30 * than use pointers a technique is used where a single byte array 31 * was placed at the end of each structure. This allows us in "C" 32 * to extend the structure by allocating more data than is needed 33 * to account for variable length structures. 34 * 35 * This also ensures that data following is allocated 36 * contiguously and makes it easier to write and read data from 37 * the file. 38 * 39 * For example to allocate space for a 256 count length UCR 40 * and BG array, and fill the allocated data. Note strlen + 1 41 * to remember NULL terminator. 42 * 43 icUcrBgCurve *ucrCurve, *bgCurve; 44 int ucr_nbytes, bg_nbytes, string_bytes; 45 icUcrBg *ucrBgWrite; 46 char ucr_string[100], *ucr_char; 47 48 strcpy(ucr_string, "Example ucrBG curves"); 49 ucr_nbytes = sizeof(icUInt32Number) + 50 (UCR_CURVE_SIZE * sizeof(icUInt16Number)); 51 bg_nbytes = sizeof(icUInt32Number) + 52 (BG_CURVE_SIZE * sizeof(icUInt16Number)); 53 string_bytes = strlen(ucr_string) + 1; 54 55 ucrBgWrite = (icUcrBg *)malloc( 56 (ucr_nbytes + bg_nbytes + string_bytes)); 57 58 ucrCurve = (icUcrBgCurve *)ucrBgWrite->data; 59 ucrCurve->count = UCR_CURVE_SIZE; 60 for (i=0; i<ucrCurve->count; i++) 61 ucrCurve->curve[i] = (icUInt16Number)i; 62 63 bgCurve = (icUcrBgCurve *)((char *)ucrCurve + ucr_nbytes); 64 bgCurve->count = BG_CURVE_SIZE; 65 for (i=0; i<bgCurve->count; i++) 66 bgCurve->curve[i] = 255 - (icUInt16Number)i; 67 68 ucr_char = (char *)((char *)bgCurve + bg_nbytes); 69 memcpy(ucr_char, ucr_string, string_bytes); 70 71 * Many of the structures contain variable length arrays. This 72 * is represented by the use of the convention. 73 * 74 * type data[icAny]; 75 */ 76 77 /* 78 * 79 * 80 * Copyright (c) 2003-2010 The International Color Consortium. 81 * 82 * 83 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 84 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 85 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 86 * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR 87 * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 88 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 89 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 90 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 91 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 92 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 93 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 94 * SUCH DAMAGE. 95 * ==================================================================== 96 * 97 * This software consists of voluntary contributions made by many 98 * individuals on behalf of the The International Color Consortium. 99 * 100 * 101 * Membership in the ICC is encouraged when this software is used for 102 * commercial purposes. 103 * 104 * 105 * For more information on The International Color Consortium, please 106 * see <http://www.color.org/>. 107 * 108 * 109 */ 110 111 112 /***************************************************************** 113 Copyright (c) 2002 Heidelberger Druckmaschinen AG 114 115 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 116 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 117 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 118 * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR 119 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 120 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 121 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 122 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 123 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 124 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 125 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 126 * SUCH DAMAGE. 127 ******************************************************************/ 128 129 /***************************************************************** 130 Copyright (c) 1994 SunSoft, Inc. 131 132 Rights Reserved 133 134 Permission is hereby granted, free of charge, to any person 135 obtaining a copy of this software and associated documentation 136 files (the "Software"), to deal in the Software without restrict- 137 ion, including without limitation the rights to use, copy, modify, 138 merge, publish distribute, sublicense, and/or sell copies of the 139 Software, and to permit persons to whom the Software is furnished 140 to do so, subject to the following conditions: 141 142 The above copyright notice and this permission notice shall be 143 included in all copies or substantial portions of the Software. 144 145 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 146 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 147 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON- 148 INFRINGEMENT. IN NO EVENT SHALL SUNSOFT, INC. OR ITS PARENT 149 COMPANY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 150 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 151 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 152 OTHER DEALINGS IN THE SOFTWARE. 153 154 Except as contained in this notice, the name of SunSoft, Inc. 155 shall not be used in advertising or otherwise to promote the 156 sale, use or other dealings in this Software without written 157 authorization from SunSoft Inc. 158 ******************************************************************/ 159 160 161 162 /* Header file guard bands */ 163 #ifndef icPROFILEHEADER_H 164 #define icPROFILEHEADER_H 165 166 167 /* In order for structures to work it is important to ensure that 168 * the structure packing is set to 1. On many compilers this 169 * can be accomplished using #pragma pack(1). Define the macro 170 * ICSETBYTEPACKING to enable the following.*/ 171 #ifdef ICSETBYTEPACKING 172 #pragma pack(1) 173 #endif 174 175 /*------------------------------------------------------------------------*/ 176 177 /** 178 * Defines used in the specification 179 */ 180 #define icMagicNumber 0x61637370 /* 'acsp' */ 181 #define icVersionNumber 0x02000000 /* 2.0, BCD */ 182 #define icVersionNumberV2_1 0x02100000 /* 2.1, BCD */ 183 #define icVersionNumberV4 0x04000000 /* 4.0, BCD */ 184 #define icVersionNumberV4_2 0x04200000 /* 4.2, BCD */ 185 186 /** Screening Encodings */ 187 #define icPrtrDefaultScreensFalse 0x00000000 /* Bit position 0 */ 188 #define icPrtrDefaultScreensTrue 0x00000001 /* Bit position 0 */ 189 #define icLinesPerInch 0x00000002 /* Bit position 1 */ 190 #define icLinesPerCm 0x00000000 /* Bit position 1 */ 191 192 /** 193 * Device attributes, currently defined values correspond 194 * to the low 4 bytes of the 8 byte attribute quantity, see 195 * the header for their location. 196 */ 197 #define icReflective 0x00000000 /* Bit position 0 */ 198 #define icTransparency 0x00000001 /* Bit position 0 */ 199 #define icGlossy 0x00000000 /* Bit position 1 */ 200 #define icMatte 0x00000002 /* Bit position 1 */ 201 #define icMediaPositive 0x00000000 /* Bit position 2 */ 202 #define icMediaNegative 0x00000004 /* Bit position 2 */ 203 #define icMediaColour 0x00000000 /* Bit position 3 */ 204 #define icMediaBlackAndWhite 0x00000008 /* Bit position 3 */ 205 206 /** 207 * Profile header flags, the low 16 bits are reserved for consortium 208 * use. 209 */ 210 #define icEmbeddedProfileFalse 0x00000000 /* Bit position 0 */ 211 #define icEmbeddedProfileTrue 0x00000001 /* Bit position 0 */ 212 #define icUseAnywhere 0x00000000 /* Bit position 1 */ 213 #define icUseWithEmbeddedDataOnly 0x00000002 /* Bit position 1 */ 214 215 /** Ascii or Binary data */ 216 #define icAsciiData 0x00000000 /* Used in dataType */ 217 #define icBinaryData 0x00000001 218 219 /** 220 * Define used to indicate that this is a variable length array 221 */ 222 #define icAny 1 223 224 /** 225 * Number definitions 226 * 227 * NOTE: 228 * Integer definitions vary from compiler to compiler. Rather than 229 * provide complex checking for compiler and system, default implementations 230 * are provided with the ability to redefine actual meaning based upon 231 * macros. This can be accomplished in a separate header file that first defines 232 * the macros and then includes this header, or by defining macro values on 233 * a project level. 234 */ 235 236 /** Unsigned integer numbers */ 237 #ifdef ICUINT8TYPE 238 typedef ICUINT8TYPE icUInt8Number; 239 #else 240 typedef unsigned char icUInt8Number; 241 #endif 242 243 #ifdef ICUINT16TYPE 244 typedef ICUINT16TYPE icUInt16Number; 245 #else 246 typedef unsigned short icUInt16Number; 247 #endif 248 249 #ifdef ICUINT32TYPE 250 typedef ICUINT32TYPE icUInt32Number; 251 #else 252 typedef unsigned long icUInt32Number; 253 #endif 254 255 #ifdef ICUINT64TYPE 256 typedef ICUINT64TYPE icUInt64Number; 257 #else 258 typedef icUInt32Number icUInt64Number[2]; 259 #endif 260 261 typedef icUInt32Number icSignature; 262 263 264 /** Signed numbers */ 265 #ifdef ICINT8TYPE 266 typedef ICINT8TYPE icInt8Number; 267 #else 268 typedef char icInt8Number; 269 #endif 270 271 #ifdef ICINT16TYPE 272 typedef ICINT16TYPE icInt16Number; 273 #else 274 typedef short icInt16Number; 275 #endif 276 277 #ifdef ICINT32TYPE 278 typedef ICINT32TYPE icInt32Number; 279 #else 280 typedef long icInt32Number; 281 #endif 282 283 #ifdef ICINT64TYPE 284 typedef ICINT64TYPE icInt64Number; 285 #else 286 typedef icInt32Number icInt64Number[2]; 287 #endif 288 289 290 /** Fixed numbers */ 291 typedef icInt32Number icS15Fixed16Number; 292 typedef icUInt32Number icU16Fixed16Number; 293 294 295 /** IEEE float storage numbers */ 296 typedef float icFloat32Number; 297 typedef double icFloat64Number; 298 299 /** Useful macros for defining Curve Segment breakpoints **/ 300 #define icMaxFloat32Number 3.402823466e+38F 301 #define icMinFloat32Number -3.402823466e+38F 302 303 /** 16-bit unicode characters **/ 304 typedef icUInt16Number icUnicodeChar; 305 306 /*------------------------------------------------------------------------*/ 307 308 /** 309 * public tags and sizes 310 */ 311 typedef enum { 312 icSigAToB0Tag = 0x41324230, /* 'A2B0' */ 313 icSigAToB1Tag = 0x41324231, /* 'A2B1' */ 314 icSigAToB2Tag = 0x41324232, /* 'A2B2' */ 315 icSigBlueColorantTag = 0x6258595A, /* 'bXYZ' */ 316 icSigBlueMatrixColumnTag = 0x6258595A, /* 'bXYZ' */ 317 icSigBlueTRCTag = 0x62545243, /* 'bTRC' */ 318 icSigBToA0Tag = 0x42324130, /* 'B2A0' */ 319 icSigBToA1Tag = 0x42324131, /* 'B2A1' */ 320 icSigBToA2Tag = 0x42324132, /* 'B2A2' */ 321 icSigCalibrationDateTimeTag = 0x63616C74, /* 'calt' */ 322 icSigCharTargetTag = 0x74617267, /* 'targ' */ 323 icSigChromaticAdaptationTag = 0x63686164, /* 'chad' */ 324 icSigChromaticityTag = 0x6368726D, /* 'chrm' */ 325 icSigColorantOrderTag = 0x636C726F, /* 'clro' */ 326 icSigColorantTableTag = 0x636C7274, /* 'clrt' */ 327 icSigColorantTableOutTag = 0x636C6F74, /* 'clot' */ 328 icSigColorimetricIntentImageStateTag = 0x63696973, /* 'ciis' */ 329 icSigCopyrightTag = 0x63707274, /* 'cprt' */ 330 icSigCrdInfoTag = 0x63726469, /* 'crdi' Removed in V4 */ 331 icSigDataTag = 0x64617461, /* 'data' Removed in V4 */ 332 icSigDateTimeTag = 0x6474696D, /* 'dtim' Removed in V4 */ 333 icSigDeviceMfgDescTag = 0x646D6E64, /* 'dmnd' */ 334 icSigDeviceModelDescTag = 0x646D6464, /* 'dmdd' */ 335 icSigDeviceSettingsTag = 0x64657673, /* 'devs' Removed in V4 */ 336 icSigDToB0Tag = 0x44324230, /* 'D2B0' */ 337 icSigDToB1Tag = 0x44324231, /* 'D2B1' */ 338 icSigDToB2Tag = 0x44324232, /* 'D2B2' */ 339 icSigDToB3Tag = 0x44324233, /* 'D2B3' */ 340 icSigBToD0Tag = 0x42324430, /* 'B2D0' */ 341 icSigBToD1Tag = 0x42324431, /* 'B2D1' */ 342 icSigBToD2Tag = 0x42324432, /* 'B2D2' */ 343 icSigBToD3Tag = 0x42324433, /* 'B2D3' */ 344 icSigGamutTag = 0x67616D74, /* 'gamt' */ 345 icSigGrayTRCTag = 0x6b545243, /* 'kTRC' */ 346 icSigGreenColorantTag = 0x6758595A, /* 'gXYZ' */ 347 icSigGreenMatrixColumnTag = 0x6758595A, /* 'gXYZ' */ 348 icSigGreenTRCTag = 0x67545243, /* 'gTRC' */ 349 icSigLuminanceTag = 0x6C756d69, /* 'lumi' */ 350 icSigMeasurementTag = 0x6D656173, /* 'meas' */ 351 icSigMediaBlackPointTag = 0x626B7074, /* 'bkpt' */ 352 icSigMediaWhitePointTag = 0x77747074, /* 'wtpt' */ 353 icSigMetaDataTag = 0x6D657461, /* 'meta' */ 354 #if 0 355 icSigNamedColorTag = 0x6E636f6C, /* 'ncol' OBSOLETE, use ncl2 */ 356 #endif 357 icSigNamedColor2Tag = 0x6E636C32, /* 'ncl2' */ 358 icSigOutputResponseTag = 0x72657370, /* 'resp' */ 359 icSigPerceptualRenderingIntentGamutTag = 0x72696730, /* 'rig0' */ 360 icSigPreview0Tag = 0x70726530, /* 'pre0' */ 361 icSigPreview1Tag = 0x70726531, /* 'pre1' */ 362 icSigPreview2Tag = 0x70726532, /* 'pre2' */ 363 icSigPrintConditionTag = 0x7074636e, /* 'ptcn' */ 364 icSigProfileDescriptionTag = 0x64657363, /* 'desc' */ 365 icSigProfileSequenceDescTag = 0x70736571, /* 'pseq' */ 366 icSigProfileSequceIdTag = 0x70736964, /* 'psid' */ 367 icSigPs2CRD0Tag = 0x70736430, /* 'psd0' Removed in V4 */ 368 icSigPs2CRD1Tag = 0x70736431, /* 'psd1' Removed in V4 */ 369 icSigPs2CRD2Tag = 0x70736432, /* 'psd2' Removed in V4 */ 370 icSigPs2CRD3Tag = 0x70736433, /* 'psd3' Removed in V4 */ 371 icSigPs2CSATag = 0x70733273, /* 'ps2s' Removed in V4 */ 372 icSigPs2RenderingIntentTag = 0x70733269, /* 'ps2i' Removed in V4 */ 373 icSigRedColorantTag = 0x7258595A, /* 'rXYZ' */ 374 icSigRedMatrixColumnTag = 0x7258595A, /* 'rXYZ' */ 375 icSigRedTRCTag = 0x72545243, /* 'rTRC' */ 376 icSigSaturationRenderingIntentGamutTag = 0x72696732, /* 'rig2' */ 377 icSigScreeningDescTag = 0x73637264, /* 'scrd' Removed in V4 */ 378 icSigScreeningTag = 0x7363726E, /* 'scrn' Removed in V4 */ 379 icSigTechnologyTag = 0x74656368, /* 'tech' */ 380 icSigUcrBgTag = 0x62666420, /* 'bfd ' Removed in V4 */ 381 icSigViewingCondDescTag = 0x76756564, /* 'vued' */ 382 icSigViewingConditionsTag = 0x76696577, /* 'view' */ 383 } icTagSignature; 384 385 /** Convenience Enum Definitions - Not defined in ICC specification*/ 386 #define icSigUnknownTag ((icTagSignature) 0x3f3f3f3f) /* '????' */ 387 #define icMaxEnumTag ((icTagSignature) 0xFFFFFFFF) 388 389 390 391 /** 392 * technology signature descriptions 393 */ 394 typedef enum { 395 icSigDigitalCamera = 0x6463616D, /* 'dcam' */ 396 icSigFilmScanner = 0x6673636E, /* 'fscn' */ 397 icSigReflectiveScanner = 0x7273636E, /* 'rscn' */ 398 icSigInkJetPrinter = 0x696A6574, /* 'ijet' */ 399 icSigThermalWaxPrinter = 0x74776178, /* 'twax' */ 400 icSigElectrophotographicPrinter = 0x6570686F, /* 'epho' */ 401 icSigElectrostaticPrinter = 0x65737461, /* 'esta' */ 402 icSigDyeSublimationPrinter = 0x64737562, /* 'dsub' */ 403 icSigPhotographicPaperPrinter = 0x7270686F, /* 'rpho' */ 404 icSigFilmWriter = 0x6670726E, /* 'fprn' */ 405 icSigVideoMonitor = 0x7669646D, /* 'vidm' */ 406 icSigVideoCamera = 0x76696463, /* 'vidc' */ 407 icSigProjectionTelevision = 0x706A7476, /* 'pjtv' */ 408 icSigCRTDisplay = 0x43525420, /* 'CRT ' */ 409 icSigPMDisplay = 0x504D4420, /* 'PMD ' */ 410 icSigAMDisplay = 0x414D4420, /* 'AMD ' */ 411 icSigPhotoCD = 0x4B504344, /* 'KPCD' */ 412 icSigPhotoImageSetter = 0x696D6773, /* 'imgs' */ 413 icSigGravure = 0x67726176, /* 'grav' */ 414 icSigOffsetLithography = 0x6F666673, /* 'offs' */ 415 icSigSilkscreen = 0x73696C6B, /* 'silk' */ 416 icSigFlexography = 0x666C6578, /* 'flex' */ 417 icSigMotionPictureFilmScanner = 0x6D706673, /* 'mpfs' */ 418 icSigMotionPictureFilmRecorder = 0x6D706672, /* 'mpfr' */ 419 icSigDigitalMotionPictureCamera = 0x646D7063, /* 'dmpc' */ 420 icSigDigitalCinemaProjector = 0x64636A70, /* 'dcpj' */ 421 } icTechnologySignature; 422 423 /** Convenience Enum Definition - Not defined in ICC specification*/ 424 #define icMaxEnumTechnology ((icTechnologySignature) 0xFFFFFFFF) 425 426 /** 427 * type signatures 428 */ 429 typedef enum { 430 icSigChromaticityType = 0x6368726D, /* 'chrm' */ 431 icSigColorantOrderType = 0x636C726F, /* 'clro' */ 432 icSigColorantTableType = 0x636C7274, /* 'clrt' */ 433 icSigCrdInfoType = 0x63726469, /* 'crdi' Removed in V4 */ 434 icSigCurveType = 0x63757276, /* 'curv' */ 435 icSigDataType = 0x64617461, /* 'data' */ 436 icSigDictType = 0x64696374, /* 'dict' */ 437 icSigDateTimeType = 0x6474696D, /* 'dtim' */ 438 icSigDeviceSettingsType = 0x64657673, /* 'devs' Removed in V4 */ 439 icSigLut16Type = 0x6d667432, /* 'mft2' */ 440 icSigLut8Type = 0x6d667431, /* 'mft1' */ 441 icSigLutAtoBType = 0x6d414220, /* 'mAB ' */ 442 icSigLutBtoAType = 0x6d424120, /* 'mBA ' */ 443 icSigMeasurementType = 0x6D656173, /* 'meas' */ 444 icSigMultiLocalizedUnicodeType = 0x6D6C7563, /* 'mluc' */ 445 icSigMultiProcessElementType = 0x6D706574, /* 'mpet' */ 446 #if 0 447 icSigNamedColorType = 0x6E636f6C, /* 'ncol' OBSOLETE, use ncl2 */ 448 #endif 449 icSigNamedColor2Type = 0x6E636C32, /* 'ncl2' */ 450 icSigParametricCurveType = 0x70617261, /* 'para' */ 451 icSigProfileSequenceDescType = 0x70736571, /* 'pseq' */ 452 icSigProfileSequceIdType = 0x70736964, /* 'psid' */ 453 icSigResponseCurveSet16Type = 0x72637332, /* 'rcs2' */ 454 icSigS15Fixed16ArrayType = 0x73663332, /* 'sf32' */ 455 icSigScreeningType = 0x7363726E, /* 'scrn' Removed in V4 */ 456 icSigSignatureType = 0x73696720, /* 'sig ' */ 457 icSigTextType = 0x74657874, /* 'text' */ 458 icSigTextDescriptionType = 0x64657363, /* 'desc' Removed in V4 */ 459 icSigU16Fixed16ArrayType = 0x75663332, /* 'uf32' */ 460 icSigUcrBgType = 0x62666420, /* 'bfd ' Removed in V4 */ 461 icSigUInt16ArrayType = 0x75693136, /* 'ui16' */ 462 icSigUInt32ArrayType = 0x75693332, /* 'ui32' */ 463 icSigUInt64ArrayType = 0x75693634, /* 'ui64' */ 464 icSigUInt8ArrayType = 0x75693038, /* 'ui08' */ 465 icSigViewingConditionsType = 0x76696577, /* 'view' */ 466 icSigXYZType = 0x58595A20, /* 'XYZ ' */ 467 icSigXYZArrayType = 0x58595A20, /* 'XYZ ' */ 468 } icTagTypeSignature; 469 470 /** Convenience Enum Definitions - Not defined in ICC specification*/ 471 #define icSigUnknownType ((icTagTypeSignature) 0x3f3f3f3f) /* '????' */ 472 #define icMaxEnumType ((icTagTypeSignature) 0xFFFFFFFF) 473 474 /** 475 * Element type signatures 476 */ 477 typedef enum { 478 //DMP Proposal 1.0 elements 479 icSigCurveSetElemType = 0x63767374, /* 'cvst' */ 480 icSigMatrixElemType = 0x6D617466, /* 'matf' */ 481 icSigCLutElemType = 0x636C7574, /* 'clut' */ 482 icSigBAcsElemType = 0x62414353, /* 'bACS' */ 483 icSigEAcsElemType = 0x65414353, /* 'eACS' */ 484 } icElemTypeSignature; 485 /** Convenience Enum Definitions - Not defined in proposal*/ 486 #define icSigUnknownElemType ((icElemTypeSignature) 0x3f3f3f3f) /* '????' */ 487 #define icMaxEnumElemType ((icElemTypeSignature) 0xFFFFFFFF) 488 489 490 /** 491 * Color Space Signatures. 492 * Note that only icSigXYZData and icSigLabData are valid 493 * Profile Connection Spaces (PCSs) 494 */ 495 typedef enum { 496 icSigXYZData = 0x58595A20, /* 'XYZ ' */ 497 icSigLabData = 0x4C616220, /* 'Lab ' */ 498 icSigLuvData = 0x4C757620, /* 'Luv ' */ 499 icSigYCbCrData = 0x59436272, /* 'YCbr' */ 500 icSigYxyData = 0x59787920, /* 'Yxy ' */ 501 icSigRgbData = 0x52474220, /* 'RGB ' */ 502 icSigGrayData = 0x47524159, /* 'GRAY' */ 503 icSigHsvData = 0x48535620, /* 'HSV ' */ 504 icSigHlsData = 0x484C5320, /* 'HLS ' */ 505 icSigCmykData = 0x434D594B, /* 'CMYK' */ 506 icSigCmyData = 0x434D5920, /* 'CMY ' */ 507 508 icSigMCH2Data = 0x32434C52, /* '2CLR' */ 509 icSigMCH3Data = 0x33434C52, /* '3CLR' */ 510 icSigMCH4Data = 0x34434C52, /* '4CLR' */ 511 icSigMCH5Data = 0x35434C52, /* '5CLR' */ 512 icSigMCH6Data = 0x36434C52, /* '6CLR' */ 513 icSigMCH7Data = 0x37434C52, /* '7CLR' */ 514 icSigMCH8Data = 0x38434C52, /* '8CLR' */ 515 icSigMCH9Data = 0x39434C52, /* '9CLR' */ 516 icSigMCHAData = 0x41434C52, /* 'ACLR' */ 517 icSigMCHBData = 0x42434C52, /* 'BCLR' */ 518 icSigMCHCData = 0x43434C52, /* 'CCLR' */ 519 icSigMCHDData = 0x44434C52, /* 'DCLR' */ 520 icSigMCHEData = 0x45434C52, /* 'ECLR' */ 521 icSigMCHFData = 0x46434C52, /* 'FCLR' */ 522 icSigNamedData = 0x6e6d636c, /* 'nmcl' */ 523 524 icSig2colorData = 0x32434C52, /* '2CLR' */ 525 icSig3colorData = 0x33434C52, /* '3CLR' */ 526 icSig4colorData = 0x34434C52, /* '4CLR' */ 527 icSig5colorData = 0x35434C52, /* '5CLR' */ 528 icSig6colorData = 0x36434C52, /* '6CLR' */ 529 icSig7colorData = 0x37434C52, /* '7CLR' */ 530 icSig8colorData = 0x38434C52, /* '8CLR' */ 531 icSig9colorData = 0x39434C52, /* '9CLR' */ 532 icSig10colorData = 0x41434C52, /* 'ACLR' */ 533 icSig11colorData = 0x42434C52, /* 'BCLR' */ 534 icSig12colorData = 0x43434C52, /* 'CCLR' */ 535 icSig13colorData = 0x44434C52, /* 'DCLR' */ 536 icSig14colorData = 0x45434C52, /* 'ECLR' */ 537 icSig15colorData = 0x46434C52, /* 'FCLR' */ 538 539 } icColorSpaceSignature; 540 541 /** Defined by previous versions of header file but not defined in ICC specification */ 542 #define icSigMCH1Data ((icColorSpaceSignature) 0x31434C52) /* '1CLR' */ 543 #define icSigMCHGData ((icColorSpaceSignature) 0x47434C52) /* 'GCLR' */ 544 #define icSig1colorData ((icColorSpaceSignature) 0x31434C52) /* '1CLR' */ 545 #define icSig16colorData ((icColorSpaceSignature) 0x47434C52) /* 'GCLR' */ 546 547 /** Convenience Enum Definitions - Not defined in ICC specification*/ 548 #define icSigGamutData ((icColorSpaceSignature) 0x67616D74) /* 'gamt' */ 549 #define icSigUnknownData ((icColorSpaceSignature) 0x3f3f3f3f) /* '????' */ 550 #define icMaxEnumData ((icColorSpaceSignature) 0xFFFFFFFF) 551 552 553 554 /** profileClass enumerations */ 555 typedef enum { 556 icSigInputClass = 0x73636E72, /* 'scnr' */ 557 icSigDisplayClass = 0x6D6E7472, /* 'mntr' */ 558 icSigOutputClass = 0x70727472, /* 'prtr' */ 559 icSigLinkClass = 0x6C696E6B, /* 'link' */ 560 icSigAbstractClass = 0x61627374, /* 'abst' */ 561 icSigColorSpaceClass = 0x73706163, /* 'spac' */ 562 icSigNamedColorClass = 0x6e6d636c, /* 'nmcl' */ 563 } icProfileClassSignature; 564 565 /** Convenience Enum Definition - Not defined in ICC specification*/ 566 #define icMaxEnumClass ((icProfileClassSignature) 0xFFFFFFFF) 567 568 569 570 /** Platform Signatures */ 571 typedef enum { 572 icSigMacintosh = 0x4150504C, /* 'APPL' */ 573 icSigMicrosoft = 0x4D534654, /* 'MSFT' */ 574 icSigSolaris = 0x53554E57, /* 'SUNW' */ 575 icSigSGI = 0x53474920, /* 'SGI ' */ 576 icSigTaligent = 0x54474E54, /* 'TGNT' */ 577 icSigUnkownPlatform = 0x00000000 578 } icPlatformSignature; 579 580 /** Convenience Enum Definition - Not defined in ICC specification*/ 581 #define icMaxEnumPlatform ((icPlatformSignature) 0xFFFFFFFF) 582 583 584 /** CMM signatures from the signature registry (as of Jan 10, 2007) */ 585 typedef enum { 586 icSigAdobe = 0x41444245, /* 'ADBE' */ 587 icSigApple = 0x6170706C, /* 'appl' */ 588 icSigColorGear = 0x43434D53, /* 'CCMS' */ 589 icSigColorGearLite = 0x5543434D, /* 'UCCM' */ 590 icSigFujiFilm = 0x46462020, /* 'FF ' */ 591 icSigHarlequinRIP = 0x48434d4d, /* 'HCMM' */ 592 icSigArgyllCMS = 0x6172676C, /* 'argl' */ 593 icSigLogoSync = 0x44676f53, /* 'LgoS' */ 594 icSigHeidelberg = 0x48444d20, /* 'HDM ' */ 595 icSigLittleCMS = 0x6C636d73, /* 'lcms' */ 596 icSigKodak = 0x4b434d53, /* 'KCMS' */ 597 icSigKonicaMinolta = 0x4d434d44, /* 'MCML' */ 598 icSigMutoh = 0x5349474E, /* 'SIGN' */ 599 icSigSampleICC = 0x53494343, /* 'SICC' */ 600 icSigTheImagingFactory = 0x33324254, /* '32BT' */ 601 } icCmmSignature; 602 /** Convenience Enum Definition - Not defined in ICC specification*/ 603 #define icMaxEnumCmm ((icCmmSignature) 0xFFFFFFFF) 604 605 606 /** Rendering Intent Gamut Signatures */ 607 typedef enum { 608 icSigPerceptualReferenceMediumGamut = 0x70726d67, /* 'prmg' */ 609 } icReferenceMediumGamutSignature; 610 611 /** Convenience Enum Definition - Not defined in ICC specification*/ 612 #define icMaxEnumReferenceMediumGamut ((icReferenceMediumGamutSignature 0xFFFFFFFF) 613 614 615 /** Colorimetric Intent Image State Gamut Signatures */ 616 typedef enum { 617 icSigSceneColorimetryEstimates = 0x73636F65, /* 'scoe' */ 618 icSigSceneAppearanceEstimates = 0x73617065, /* 'sape' */ 619 icSigFocalPlaneColorimetryEstimates = 0x66706365, /* 'fpce' */ 620 icSigReflectionHardcopyOriginalColorimetry = 0x72686F63, /* 'rhoc' */ 621 icSigReflectionPrintOutputColorimetry = 0x72706F63, /* 'rpoc' */ 622 } icColorimetricIntentImageStateSignature; 623 624 /** Convenience Enum Definition - Not defined in ICC specification*/ 625 #define icMaxEnumColorimetricIntentImageState ((icColorimetricIntentImageStateSignature 0xFFFFFFFF) 626 627 628 /** 629 * MPE Curve segment Signatures 630 */ 631 typedef enum { 632 icSigFormulaCurveSeg = 0x70617266, /* 'parf' */ 633 icSigSampledCurveSeg = 0x73616D66, /* 'samf' */ 634 } icCurveSegSignature; 635 636 /** Convenience Enum Definition - Not defined in ICC specification*/ 637 #define icMaxCurveSegSignature ((icCurveSegSignature 0xFFFFFFFF) 638 639 /** 640 * MPE Curve Set Curve signature 641 */ 642 typedef enum { 643 icSigSementedCurve = 0x63757266, /* 'curf' */ 644 } icCurveElemSignature; 645 646 /** Convenience Enum Definition - Not defined in ICC specification*/ 647 #define icMaxCurveElemSignature ((icCurveElemSignature 0xFFFFFFFF) 648 649 /** 650 * MPE Future Extension Acs signature 651 */ 652 653 typedef icSignature icAcsSignature; 654 655 /** Convenience Definition - Not defined in ICC specification*/ 656 #define icSigAcsZero ((icAcsSignature) 0x00000000) 657 658 /*------------------------------------------------------------------------*/ 659 660 /** 661 * Other enums 662 */ 663 664 /** Measurement Flare, used in the measurmentType tag */ 665 typedef enum { 666 icFlare0 = 0x00000000, /* 0% flare */ 667 icFlare100 = 0x00000001, /* 100% flare */ 668 669 #ifdef ICC_ENUM_CONVENIENCE 670 /** Convenience Enum Definition - Not defined in ICC specification*/ 671 icMaxEnumFlare = 0xFFFFFFFF, 672 icMaxFlare = 0xFFFFFFFF, /* as defined by earlier versions */ 673 #endif 674 } icMeasurementFlare; 675 676 #ifndef ICC_ENUM_CONVENIENCE 677 /** Convenience Enum Definition - Not defined in ICC specification*/ 678 #define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF) 679 #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */ 680 #endif 681 682 683 /** Measurement Geometry, used in the measurmentType tag */ 684 typedef enum { 685 icGeometryUnknown = 0x00000000, /* Unknown geometry */ 686 icGeometry045or450 = 0x00000001, /* 0/45, 45/0 */ 687 icGeometry0dord0 = 0x00000002, /* 0/d or d/0 */ 688 689 #ifdef ICC_ENUM_CONVENIENCE 690 /** Convenience Enum Definition - Not defined in ICC specification*/ 691 icMaxEnumGeometry = 0xFFFFFFFF, 692 icMaxGeometry = 0xFFFFFFFF, 693 #endif 694 } icMeasurementGeometry; 695 696 #ifndef ICC_ENUM_CONVENIENCE 697 /** Convenience Enum Definition - Not defined in ICC specification*/ 698 #define icMaxEnumGeometry ((icMeasurementGeometry) 0xFFFFFFFF) 699 #define icMaxGeometry ((icMeasurementGeometry) 0xFFFFFFFF) 700 #endif 701 702 703 /** Rendering Intents, used in the profile header */ 704 typedef enum { 705 icPerceptual = 0, 706 icRelativeColorimetric = 1, 707 icSaturation = 2, 708 icAbsoluteColorimetric = 3, 709 710 #ifdef ICC_ENUM_CONVENIENCE 711 /** Convenience Enum Definitions - Not defined in ICC specification*/ 712 icUnknownIntent = 0x3f3f3f3f, /* '????' */ 713 icMaxEnumIntent = 0xFFFFFFFF, 714 #endif 715 } icRenderingIntent; 716 717 #ifndef ICC_ENUM_CONVENIENCE 718 /** Convenience Enum Definitions - Not defined in ICC specification*/ 719 #define icUnknownIntent ((icRenderingIntent) 0x3f3f3f3f) /* '????' */ 720 #define icMaxEnumIntent ((icRenderingIntent) 0xFFFFFFFF) 721 #endif 722 723 724 725 /** Different Spot Shapes currently defined, used for screeningType */ 726 typedef enum { 727 icSpotShapeUnknown = 0, 728 icSpotShapePrinterDefault = 1, 729 icSpotShapeRound = 2, 730 icSpotShapeDiamond = 3, 731 icSpotShapeEllipse = 4, 732 icSpotShapeLine = 5, 733 icSpotShapeSquare = 6, 734 icSpotShapeCross = 7, 735 736 #ifdef ICC_ENUM_CONVENIENCE 737 /** Convenience Enum Definition - Not defined in ICC specification*/ 738 icMaxEnumSpot = 0xFFFFFFFF, 739 #endif 740 } icSpotShape; 741 742 #ifndef ICC_ENUM_CONVENIENCE 743 /** Convenience Enum Definition - Not defined in ICC specification*/ 744 #define icMaxEnumSpot ((icSpotShape) 0xFFFFFFFF) 745 #endif 746 747 748 749 /** Standard Observer, used in the measurmentType tag */ 750 typedef enum { 751 icStdObsUnknown = 0x00000000, /* Unknown observer */ 752 icStdObs1931TwoDegrees = 0x00000001, /* 1931 two degrees */ 753 icStdObs1964TenDegrees = 0x00000002, /* 1961 ten degrees */ 754 755 #ifdef ICC_ENUM_CONVENIENCE 756 /** Convenience Enum Definitions - Not defined in ICC specification*/ 757 icMaxEnumStdObs = 0xFFFFFFFF, 758 icMaxStdObs = 0xFFFFFFFF, 759 #endif 760 } icStandardObserver; 761 762 #ifndef ICC_ENUM_CONVENIENCE 763 /** Convenience Enum Definition - Not defined in ICC specification*/ 764 #define icMaxEnumStdObs ((icStandardObserver) 0xFFFFFFFF) 765 #define icMaxStdObs ((icStandardObserver) 0xFFFFFFFF) /* as defined by earlier versions */ 766 #endif 767 768 769 770 /** Pre-defined illuminants, used in measurement and viewing conditions type */ 771 typedef enum { 772 icIlluminantUnknown = 0x00000000, 773 icIlluminantD50 = 0x00000001, 774 icIlluminantD65 = 0x00000002, 775 icIlluminantD93 = 0x00000003, 776 icIlluminantF2 = 0x00000004, 777 icIlluminantD55 = 0x00000005, 778 icIlluminantA = 0x00000006, 779 icIlluminantEquiPowerE = 0x00000007, /* Equi-Power (E) */ 780 icIlluminantF8 = 0x00000008, 781 782 #ifdef ICC_ENUM_CONVENIENCE 783 /** Convenience Enum Definitions - Not defined in ICC specification*/ 784 icMaxEnumIlluminant = 0xFFFFFFFF, 785 icMaxEnumIluminant = 0xFFFFFFFF, /* as defined by earlier versions */ 786 #endif 787 } icIlluminant; 788 789 #ifndef ICC_ENUM_CONVENIENCE 790 /** Convenience Enum Definitions - Not defined in ICC specification*/ 791 #define icMaxEnumIlluminant ((icIlluminant) 0xFFFFFFFF) 792 #define icMaxEnumIluminant ((icIlluminant) 0xFFFFFFFF) /* as defined by earlier versions */ 793 #endif 794 795 796 797 /** A not so exhaustive list of language codes */ 798 typedef enum { 799 icLanguageCodeEnglish = 0x656E, /* 'en' */ 800 icLanguageCodeGerman = 0x6465, /* 'de' */ 801 icLanguageCodeItalian = 0x6974, /* 'it' */ 802 icLanguageCodeDutch = 0x6E6C, /* 'nl' */ 803 icLanguageCodeSweden = 0x7376, /* 'sv' */ 804 icLanguageCodeSpanish = 0x6573, /* 'es' */ 805 icLanguageCodeDanish = 0x6461, /* 'da' */ 806 icLanguageCodeNorwegian = 0x6E6F, /* 'no' */ 807 icLanguageCodeJapanese = 0x6A61, /* 'ja' */ 808 icLanguageCodeFinnish = 0x6669, /* 'fi' */ 809 icLanguageCodeTurkish = 0x7472, /* 'tr' */ 810 icLanguageCodeKorean = 0x6B6F, /* 'ko' */ 811 icLanguageCodeChinese = 0x7A68, /* 'zh' */ 812 icLanguageCodeFrench = 0x6672, /* 'fr' */ 813 814 #ifdef ICC_ENUM_CONVENIENCE 815 /** Convenience Enum Definition - Not defined in ICC specification*/ 816 icMaxEnumLanguageCode = 0xFFFF, 817 #endif 818 } icEnumLanguageCode; 819 typedef icUInt16Number icLanguageCode; 820 821 #ifndef ICC_ENUM_CONVENIENCE 822 /** Convenience Enum Definition - Not defined in ICC specification*/ 823 #define icMaxEnumLanguageCode ((icEnumLanguageCode) 0xFFFF) 824 #endif 825 826 827 828 /** 829 * A not so exhaustive list of country codes. 830 * Helpful website: http://dev.krook.org ld.html */ 831 typedef enum { 832 icCountryCodeUSA = 0x5553, /* 'US' */ 833 icCountryCodeUnitedKingdom = 0x554B, /* 'UK' */ 834 icCountryCodeGermany = 0x4445, /* 'DE' */ 835 icCountryCodeItaly = 0x4954, /* 'IT' */ 836 icCountryCodeNetherlands = 0x4E4C, /* 'NL' */ 837 icCountryCodeSpain = 0x4543, /* 'ES' */ 838 icCountryCodeDenmark = 0x444B, /* 'DK' */ 839 icCountryCodeNorway = 0x4E4F, /* 'NO' */ 840 icCountryCodeJapan = 0x4A50, /* 'JP' */ 841 icCountryCodeFinland = 0x4649, /* 'FI' */ 842 icCountryCodeTurkey = 0x5452, /* 'TR' */ 843 icCountryCodeKorea = 0x4B52, /* 'KR' */ 844 icCountryCodeChina = 0x434E, /* 'CN' */ 845 icCountryCodeTaiwan = 0x5457, /* 'TW' */ 846 icCountryCodeFrance = 0x4652, /* 'FR' */ 847 848 #ifdef ICC_ENUM_CONVENIENCE 849 /** Convenience Enum Definition - Not defined in ICC specification*/ 850 icMaxEnumCountryCode = 0xFFFF, 851 #endif 852 } icEnumCountryCode; 853 typedef icUInt16Number icCountryCode; 854 855 #ifndef ICC_ENUM_CONVENIENCE 856 /** Convenience Enum Definition - Not defined in ICC specification*/ 857 #define icMaxEnumCountryCode ((icEnumCountryCode) 0xFFFF) 858 #endif 859 860 861 862 /** Measurement Unit Signatures used in ResponseCurveSet16Type */ 863 typedef enum { 864 icSigStatusA = 0x53746141, /* 'StaA' */ 865 icSigStatusE = 0x53746145, /* 'StaE' */ 866 icSigStatusI = 0x53746149, /* 'StaI' */ 867 icSigStatusT = 0x53746154, /* 'StaT' */ 868 icSigStatusM = 0x5374614D, /* 'StaM' */ 869 icSigDN = 0x444E2020, /* 'DN ' */ 870 icSigDNP = 0x444E2050, /* 'DN P' */ 871 icSigDNN = 0x444E4E20, /* 'DNN ' */ 872 icSigDNNP = 0x444E4E50, /* 'DNNP' */ 873 874 #ifdef ICC_ENUM_CONVENIENCE 875 /** Convenience Enum Definition - Not defined in ICC specification*/ 876 icMaxEnumMeasurmentUnitSig = 0xffffffff, 877 #endif 878 } icMeasurementUnitSig; 879 880 #ifndef ICC_ENUM_CONVENIENCE 881 /** Convenience Enum Definition - Not defined in ICC specification*/ 882 #define icMaxEnumMeasurmentUnitSig ((icMeasurementUnitSig) 0xffffffff) 883 #endif 884 885 886 887 /** Colorant and Phosphor Encodings used in chromaticity type */ 888 typedef enum { 889 icColorantUnknown = 0x0000, /* Unknown */ 890 icColorantITU = 0x0001, /* ITU-R BT.709 */ 891 icColorantSMPTE = 0x0002, /* SMPTE RP145-1994 */ 892 icColorantEBU = 0x0003, /* EBU Tech.3213-E */ 893 icColorantP22 = 0x0004, /* P22 */ 894 895 #ifdef ICC_ENUM_CONVENIENCE 896 /** Convenience Enum Definition - Not defined in ICC specification*/ 897 icMaxEnumColorant = 0xFFFF, 898 #endif 899 } icColorantEncoding; 900 901 #ifndef ICC_ENUM_CONVENIENCE 902 /** Convenience Enum Definition - Not defined in ICC specification*/ 903 #define icMaxEnumColorant ((icColorantEncoding) 0xFFFF) 904 #endif 905 906 907 /** 908 * Note: The next three enum types are for DeviceSettingType structures 909 * supported by V2 profiles. The DeviceSettingsType was removed in the 910 * V4 specificaiton.*/ 911 912 /** DeviceSettingsType structure ID signatures for Microsoft 'msft' platform*/ 913 typedef enum { 914 icMSFTDevSetResolution = 0x72736C6E, /* 'rsln' */ 915 icMSFTDevSetMediaType = 0x6D747970, /* 'mtyp' */ 916 icMSFTDevSetMediaHalftone = 0x6866746E, /* 'hftn' */ 917 918 } icMSFTDevSetSig; 919 920 /** DeviceSettingsType media encodings for Microsoft 'msft' platform */ 921 typedef enum { 922 icDMMediaStandard = 0x0001, /* Standard paper */ 923 icDMMediaTransparancy = 0x0002, /* Transparency */ 924 icDMMediaGlossy = 0x0003, /* Glossy paper */ 925 icDMMediaUser = 0x0100, /* Device-specific type media 926 are >= 256 */ 927 } icDMMediaType; 928 929 /** DeviceSettingsType media encodings for Microsoft 'msft' platform */ 930 typedef enum { 931 icDMDitherNone = 0x0001, /* No dithering */ 932 icDMDitherCoarse = 0x0002, /* Dither with a coarse brush */ 933 icDMDitherFine = 0x0003, /* Dither with a fine brush */ 934 icDMDitherLineArt = 0x0004, /* LineArt dithering */ 935 icDMDitherErrorDiffusion = 0x0005, /* Error Diffusion */ 936 icDMDitherReserved6 = 0x0006, 937 icDMDitherReserved7 = 0x0007, 938 icDMDitherReserved8 = 0x0008, 939 icDMDitherReserved9 = 0x0009, 940 icDMDitherGrayscale = 0x000A, /* Device does grayscaling */ 941 icDMDitherUser = 0x0100, /* Device-specifice halftones 942 are >= 256 */ 943 } icDMHalftoneType; 944 945 /** 946 *------------------------------------------------------------------------ 947 * 948 * Arrays of numbers 949 */ 950 951 /** Int8 Array */ 952 typedef struct { 953 icInt8Number data[icAny]; /* Variable array of values */ 954 } icInt8Array; 955 956 /** UInt8 Array */ 957 typedef struct { 958 icUInt8Number data[icAny]; /* Variable array of values */ 959 } icUInt8Array; 960 961 /** uInt16 Array */ 962 typedef struct { 963 icUInt16Number data[icAny]; /* Variable array of values */ 964 } icUInt16Array; 965 966 /** Int16 Array */ 967 typedef struct { 968 icInt16Number data[icAny]; /* Variable array of values */ 969 } icInt16Array; 970 971 /** uInt32 Array */ 972 typedef struct { 973 icUInt32Number data[icAny]; /* Variable array of values */ 974 } icUInt32Array; 975 976 /** Int32 Array */ 977 typedef struct { 978 icInt32Number data[icAny]; /* Variable array of values */ 979 } icInt32Array; 980 981 /** UInt64 Array */ 982 typedef struct { 983 icUInt64Number data[icAny]; /* Variable array of values */ 984 } icUInt64Array; 985 986 /** Int64 Array */ 987 typedef struct { 988 icInt64Number data[icAny]; /* Variable array of values */ 989 } icInt64Array; 990 991 /** u16Fixed16 Array */ 992 typedef struct { 993 icU16Fixed16Number data[icAny]; /* Variable array of values */ 994 } icU16Fixed16Array; 995 996 /** s15Fixed16 Array */ 997 typedef struct { 998 icS15Fixed16Number data[icAny]; /* Variable array of values */ 999 } icS15Fixed16Array; 1000 1001 /** The base date time number */ 1002 typedef struct { 1003 icUInt16Number year; 1004 icUInt16Number month; 1005 icUInt16Number day; 1006 icUInt16Number hours; 1007 icUInt16Number minutes; 1008 icUInt16Number seconds; 1009 } icDateTimeNumber; 1010 1011 /** XYZ Number */ 1012 typedef struct { 1013 icS15Fixed16Number X; 1014 icS15Fixed16Number Y; 1015 icS15Fixed16Number Z; 1016 } icXYZNumber; 1017 1018 /** XYZ Array */ 1019 typedef struct { 1020 icXYZNumber data[icAny]; /* Variable array of XYZ numbers */ 1021 } icXYZArray; 1022 1023 /** xy Chromaticity Number */ 1024 typedef struct { 1025 icU16Fixed16Number x; 1026 icU16Fixed16Number y; 1027 } icChromaticityNumber; 1028 1029 /** response16Number */ 1030 typedef struct { 1031 icUInt16Number deviceCode; 1032 icUInt16Number reserved; 1033 icS15Fixed16Number measurementValue; 1034 } icResponse16Number; 1035 1036 /** positionNumber **/ 1037 typedef struct { 1038 icUInt32Number offset; 1039 icUInt32Number size; 1040 } icPositionNumber; 1041 1042 1043 /** Curve */ 1044 typedef struct { 1045 icUInt32Number count; /* Number of entries */ 1046 icUInt16Number data[icAny]; /* The actual table data, real 1047 * number is determined by count 1048 * Interpretation depends on how 1049 * data is used with a given tag 1050 */ 1051 } icCurve; 1052 1053 /** Parametric Curve */ 1054 typedef struct { 1055 icUInt16Number funcType; /* Function Type */ 1056 /* 0 = gamma only */ 1057 icUInt16Number pad; /* Padding for byte alignment */ 1058 icS15Fixed16Number gamma; /* x�gamma */ 1059 /* up to 7 values Y,a,b,c,d,e,f */ 1060 } icParametricCurve; 1061 1062 /** Parametric Curve */ 1063 typedef struct { 1064 icUInt16Number funcType; /* Function Type */ 1065 /* 0 = gamma only */ 1066 icUInt16Number pad; /* Padding for byte alignment */ 1067 icS15Fixed16Number gamma; /* x�gamma */ 1068 icS15Fixed16Number a; /* a */ 1069 icS15Fixed16Number b; /* b */ 1070 icS15Fixed16Number c; /* c */ 1071 icS15Fixed16Number d; /* d */ 1072 icS15Fixed16Number e; /* e */ 1073 icS15Fixed16Number f; /* f */ 1074 } icParametricCurveFull; 1075 1076 /** Data */ 1077 typedef struct { 1078 icUInt32Number dataFlag; /* 0 = ascii, 1 = binary */ 1079 icInt8Number data[icAny]; /* Data, size determined from tag */ 1080 } icData; 1081 1082 /** lut16 */ 1083 typedef struct { 1084 icUInt8Number inputChan; /* Number of input channels */ 1085 icUInt8Number outputChan; /* Number of output channels */ 1086 icUInt8Number clutPoints; /* Number of clutTable grid points */ 1087 icInt8Number pad; /* Padding for byte alignment */ 1088 icS15Fixed16Number e00; /* e00 in the 3 * 3 */ 1089 icS15Fixed16Number e01; /* e01 in the 3 * 3 */ 1090 icS15Fixed16Number e02; /* e02 in the 3 * 3 */ 1091 icS15Fixed16Number e10; /* e10 in the 3 * 3 */ 1092 icS15Fixed16Number e11; /* e11 in the 3 * 3 */ 1093 icS15Fixed16Number e12; /* e12 in the 3 * 3 */ 1094 icS15Fixed16Number e20; /* e20 in the 3 * 3 */ 1095 icS15Fixed16Number e21; /* e21 in the 3 * 3 */ 1096 icS15Fixed16Number e22; /* e22 in the 3 * 3 */ 1097 icUInt16Number inputEnt; /* Number of input table entries */ 1098 icUInt16Number outputEnt; /* Number of output table entries */ 1099 icUInt16Number data[icAny]; /* Data follows see spec for size */ 1100 /** 1101 * Data that follows is of this form 1102 * 1103 * icUInt16Number inputTable[inputChan][icAny]; * The input table 1104 * icUInt16Number clutTable[icAny]; * The clut table 1105 * icUInt16Number outputTable[outputChan][icAny]; * The output table 1106 */ 1107 } icLut16; 1108 1109 /** lut8, input & output tables are always 256 bytes in length */ 1110 typedef struct { 1111 icUInt8Number inputChan; /* Number of input channels */ 1112 icUInt8Number outputChan; /* Number of output channels */ 1113 icUInt8Number clutPoints; /* Number of clutTable grid points */ 1114 icInt8Number pad; 1115 icS15Fixed16Number e00; /* e00 in the 3 * 3 */ 1116 icS15Fixed16Number e01; /* e01 in the 3 * 3 */ 1117 icS15Fixed16Number e02; /* e02 in the 3 * 3 */ 1118 icS15Fixed16Number e10; /* e10 in the 3 * 3 */ 1119 icS15Fixed16Number e11; /* e11 in the 3 * 3 */ 1120 icS15Fixed16Number e12; /* e12 in the 3 * 3 */ 1121 icS15Fixed16Number e20; /* e20 in the 3 * 3 */ 1122 icS15Fixed16Number e21; /* e21 in the 3 * 3 */ 1123 icS15Fixed16Number e22; /* e22 in the 3 * 3 */ 1124 icUInt8Number data[icAny]; /* Data follows see spec for size */ 1125 /** 1126 * Data that follows is of this form 1127 * 1128 * icUInt8Number inputTable[inputChan][256]; * The input table 1129 * icUInt8Number clutTable[icAny]; * The clut table 1130 * icUInt8Number outputTable[outputChan][256]; * The output table 1131 */ 1132 } icLut8; 1133 1134 /** icLutAToB */ 1135 typedef struct { 1136 icUInt8Number gridPoints[16]; /* Number of grid points in each dimension. */ 1137 icUInt8Number prec; /* Precision of data elements in bytes. */ 1138 icUInt8Number pad1; 1139 icUInt8Number pad2; 1140 icUInt8Number pad3; 1141 /*icUInt8Number data[icAny]; Data follows see spec for size */ 1142 } icCLutStruct; 1143 1144 /** icLutAtoB */ 1145 typedef struct { 1146 icUInt8Number inputChan; /* Number of input channels */ 1147 icUInt8Number outputChan; /* Number of output channels */ 1148 icUInt8Number pad1; 1149 icUInt8Number pad2; 1150 icUInt32Number offsetB; /* Offset to first "B" curve */ 1151 icUInt32Number offsetMat; /* Offset to matrix */ 1152 icUInt32Number offsetM; /* Offset to first "M" curve */ 1153 icUInt32Number offsetC; /* Offset to CLUT */ 1154 icUInt32Number offsetA; /* Offset to first "A" curve */ 1155 /*icUInt8Number data[icAny]; Data follows see spec for size */ 1156 } icLutAtoB; 1157 1158 /** icLutBtoA */ 1159 typedef struct { 1160 icUInt8Number inputChan; /* Number of input channels */ 1161 icUInt8Number outputChan; /* Number of output channels */ 1162 icUInt8Number pad1; 1163 icUInt8Number pad2; 1164 icUInt32Number offsetB; /* Offset to first "B" curve */ 1165 icUInt32Number offsetMat; /* Offset to matrix */ 1166 icUInt32Number offsetM; /* Offset to first "M" curve */ 1167 icUInt32Number offsetC; /* Offset to CLUT */ 1168 icUInt32Number offsetA; /* Offset to first "A" curve */ 1169 /*icUInt8Number data[icAny]; Data follows see spec for size */ 1170 } icLutBtoA; 1171 1172 /** Measurement Data */ 1173 typedef struct { 1174 icStandardObserver stdObserver; /* Standard observer */ 1175 icXYZNumber backing; /* XYZ for backing material */ 1176 icMeasurementGeometry geometry; /* Measurement geometry */ 1177 icMeasurementFlare flare; /* Measurement flare */ 1178 icIlluminant illuminant; /* Illuminant */ 1179 } icMeasurement; 1180 1181 /** 1182 * Named color 1183 */ 1184 1185 /** Entry format for each named color */ 1186 typedef struct { 1187 icUInt8Number rootName[32]; /* Root name for first color */ 1188 icUInt16Number pcsCoords[3]; /* PCS coordinates of color (only Lab or XYZ allowed)*/ 1189 icUInt16Number deviceCoords[icAny]; /* Device coordinates of color */ 1190 } icNamedColor2Entry; 1191 1192 /** 1193 * icNamedColor2 takes the place of icNamedColor 1194 */ 1195 typedef struct { 1196 icUInt32Number vendorFlag; /* Bottom 16 bits for IC use */ 1197 icUInt32Number count; /* Count of named colors */ 1198 icUInt32Number nDeviceCoords; /* Number of device coordinates */ 1199 icInt8Number prefix[32]; /* Prefix for each color name */ 1200 icInt8Number suffix[32]; /* Suffix for each color name */ 1201 icInt8Number data[icAny]; /* Named color data follows */ 1202 /** 1203 * Data that follows is of this form 1204 * 1205 * icInt8Number root1[32]; * Root name for first color 1206 * icUInt16Number pcsCoords1[icAny]; * PCS coordinates of first color 1207 * icUInt16Number deviceCoords1[icAny]; * Device coordinates of first color 1208 * icInt8Number root2[32]; * Root name for second color 1209 * icUInt16Number pcsCoords2[icAny]; * PCS coordinates of first color 1210 * icUInt16Number deviceCoords2[icAny]; * Device coordinates of first color 1211 * : 1212 * : 1213 * 1214 * Alternatively written if byte packing is assumed with no padding between 1215 * structures then data can take the following form 1216 * 1217 * icNamedColor2Entry entry0; // Entry for first color 1218 * icNamedColor2Entry entry1; // Entry for second color 1219 * : 1220 * : 1221 * In either case repeat for name and PCS and device color coordinates up to (count-1) 1222 * 1223 * NOTES: 1224 * PCS and device space can be determined from the header. 1225 * 1226 * PCS coordinates are icUInt16 numbers and are described in Annex A of 1227 * the ICC spec. Only 16 bit L*a*b* and XYZ are allowed. The number of 1228 * coordinates is consistent with the headers PCS. 1229 * 1230 * Device coordinates are icUInt16 numbers where 0x0000 represents 1231 * the minimum value and 0xFFFF represents the maximum value. 1232 * If the nDeviceCoords value is 0 this field is not given. 1233 */ 1234 } icNamedColor2; 1235 1236 /** Profile sequence structure */ 1237 typedef struct { 1238 icSignature deviceMfg; /* Device Manufacturer */ 1239 icSignature deviceModel; /* Decvice Model */ 1240 icUInt64Number attributes; /* Device attributes */ 1241 icTechnologySignature technology; /* Technology signature */ 1242 icInt8Number data[icAny]; /* Descriptions text follows */ 1243 /** 1244 * Data that follows is of this form, this is an icInt8Number 1245 * to avoid problems with a compiler generating bad code as 1246 * these arrays are variable in length. 1247 * 1248 * icTextDescription deviceMfgDesc; * Manufacturer text 1249 * icTextDescription modelDesc; * Model text 1250 */ 1251 } icDescStruct; 1252 1253 /** Profile sequence description */ 1254 typedef struct { 1255 icUInt32Number count; /* Number of descriptions */ 1256 icUInt8Number data[icAny]; /* Array of description struct */ 1257 } icProfileSequenceDesc; 1258 1259 /** textDescription */ 1260 typedef struct { 1261 icUInt32Number count; /* Description length */ 1262 icInt8Number data[icAny]; /* Descriptions follow */ 1263 /** 1264 * Data that follows is of this form 1265 * 1266 * icInt8Number desc[count] * NULL terminated ascii string 1267 * icUInt32Number ucLangCode; * UniCode language code 1268 * icUInt32Number ucCount; * UniCode description length 1269 * icInt16Number ucDesc[ucCount];* The UniCode description 1270 * icUInt16Number scCode; * ScriptCode code 1271 * icUInt8Number scCount; * ScriptCode count 1272 * icInt8Number scDesc[67]; * ScriptCode Description 1273 */ 1274 } icTextDescription; 1275 1276 /** Screening Data */ 1277 typedef struct { 1278 icS15Fixed16Number frequency; /* Frequency */ 1279 icS15Fixed16Number angle; /* Screen angle */ 1280 icSpotShape spotShape; /* Spot Shape encodings below */ 1281 } icScreeningData; 1282 1283 /** screening */ 1284 typedef struct { 1285 icUInt32Number screeningFlag; /* Screening flag */ 1286 icUInt32Number channels; /* Number of channels */ 1287 icScreeningData data[icAny]; /* Array of screening data */ 1288 } icScreening; 1289 1290 /** Text Data */ 1291 typedef struct { 1292 icInt8Number data[icAny]; /* Variable array of characters */ 1293 } icText; 1294 1295 /** Structure describing either a UCR or BG curve */ 1296 typedef struct { 1297 icUInt32Number count; /* Curve length */ 1298 icUInt16Number curve[icAny]; /* The array of curve values */ 1299 } icUcrBgCurve; 1300 1301 /** Under color removal, black generation */ 1302 typedef struct { 1303 icInt8Number data[icAny]; /* The Ucr BG data */ 1304 /** 1305 * Data that follows is of this form, this is a icInt8Number 1306 * to avoid problems with a compiler generating bad code as 1307 * these arrays are variable in length. 1308 * 1309 * icUcrBgCurve ucr; * Ucr curve 1310 * icUcrBgCurve bg; * Bg curve 1311 * icInt8Number string; * UcrBg description 1312 */ 1313 } icUcrBg; 1314 1315 /** viewingConditionsType */ 1316 typedef struct { 1317 icXYZNumber illuminant; /* In candelas per metre sq'd */ 1318 icXYZNumber surround; /* In candelas per metre sq'd */ 1319 icIlluminant stdIluminant; /* See icIlluminant defines */ 1320 } icViewingCondition; 1321 1322 /** CrdInfo type */ 1323 typedef struct { 1324 icUInt32Number count; /* Char count includes NULL */ 1325 icInt8Number desc[icAny]; /* Null terminated string */ 1326 } icCrdInfo; 1327 1328 /** ColorantOrder type */ 1329 typedef struct { 1330 icUInt32Number count; /* Count of colorants */ 1331 icUInt8Number data[icAny]; /* One-based number of the 1332 colorant to be printed first, 1333 second... */ 1334 } icColorantOrder; 1335 1336 /** ColorantTable Entry */ 1337 typedef struct { 1338 icInt8Number name[32]; /* First colorant name */ 1339 icUInt16Number data[3]; /* 16 bit PCS Lab value for first */ 1340 } icColorantTableEntry; 1341 1342 /** ColorantTable */ 1343 typedef struct { 1344 icUInt32Number count; /* Count of colorants */ 1345 icColorantTableEntry entry[icAny]; /* N colorant entries */ 1346 } icColorantTable; 1347 1348 /*------------------------------------------------------------------------*/ 1349 1350 /** 1351 * Tag Type definitions 1352 */ 1353 1354 1355 /** The base part of each tag */ 1356 typedef struct { 1357 icTagTypeSignature sig; /* Signature */ 1358 icInt8Number reserved[4]; /* Reserved, set to 0 */ 1359 } icTagBase; 1360 1361 /** curveType */ 1362 typedef struct { 1363 icTagBase base; /* Signature, "curv" */ 1364 icCurve curve; /* The curve data */ 1365 } icCurveType; 1366 1367 /** ParametricCurveType */ 1368 typedef struct { 1369 icTagBase base; /* Signature, "para" */ 1370 icParametricCurve curve; /* The Parametric curve data*/ 1371 } icParametricCurveType; 1372 1373 /** ParametricCurveFullType */ 1374 typedef struct { 1375 icTagBase base; /* Signature, "para" */ 1376 icParametricCurveFull curve; /* The Parametric curve data*/ 1377 } icParametricCurveFullType; 1378 1379 /** dataType */ 1380 typedef struct { 1381 icTagBase base; /* Signature, "data" */ 1382 icData data; /* The data structure */ 1383 } icDataType; 1384 1385 /** dateTimeType */ 1386 typedef struct { 1387 icTagBase base; /* Signature, "dtim" */ 1388 icDateTimeNumber date; /* The date */ 1389 } icDateTimeType; 1390 1391 /** lut16Type */ 1392 typedef struct { 1393 icTagBase base; /* Signature, "mft2" */ 1394 icLut16 lut; /* Lut16 data */ 1395 } icLut16Type; 1396 1397 /** lut8Type, input & output tables are always 256 bytes in length */ 1398 typedef struct { 1399 icTagBase base; /* Signature, "mft1" */ 1400 icLut8 lut; /* Lut8 data */ 1401 } icLut8Type; 1402 1403 /** lutAtoBType new format */ 1404 typedef struct { 1405 icTagBase base; /* Signature, "mAB " */ 1406 icLutAtoB lut; /* icLutAtoB data */ 1407 } icLutAtoBType; 1408 1409 /** lutBtoAType new format */ 1410 typedef struct { 1411 icTagBase base; /* Signature, "mBA " */ 1412 icLutBtoA lut; /* icLutBtoA data */ 1413 } icLutBtoAType; 1414 1415 /** Measurement Type */ 1416 typedef struct { 1417 icTagBase base; /* Signature, "meas" */ 1418 icMeasurement measurement; /* Measurement data */ 1419 } icMeasurementType; 1420 1421 /** 1422 * Named color type 1423 */ 1424 1425 /** icNamedColor2Type, replaces icNamedColorType */ 1426 typedef struct { 1427 icTagBase base; /* Signature, "ncl2" */ 1428 icNamedColor2 ncolor; /* Named color data */ 1429 } icNamedColor2Type; 1430 1431 /** Profile sequence description type */ 1432 typedef struct { 1433 icTagBase base; /* Signature, "pseq" */ 1434 icProfileSequenceDesc desc; /* The seq description */ 1435 } icProfileSequenceDescType; 1436 1437 /** textDescriptionType */ 1438 typedef struct { 1439 icTagBase base; /* Signature, "desc" */ 1440 icTextDescription desc; /* The description */ 1441 } icTextDescriptionType; 1442 1443 /** s15Fixed16Type */ 1444 typedef struct { 1445 icTagBase base; /* Signature, "sf32" */ 1446 icS15Fixed16Array data; /* Array of values */ 1447 } icS15Fixed16ArrayType; 1448 1449 /** screeningType */ 1450 typedef struct { 1451 icTagBase base; /* Signature, "scrn" */ 1452 icScreening screen; /* Screening structure */ 1453 } icScreeningType; 1454 1455 /** sigType */ 1456 typedef struct { 1457 icTagBase base; /* Signature, "sig" */ 1458 icSignature signature; /* The signature data */ 1459 } icSignatureType; 1460 1461 /** textType */ 1462 typedef struct { 1463 icTagBase base; /* Signature, "text" */ 1464 icText data; /* Variable array of characters */ 1465 } icTextType; 1466 1467 /** u16Fixed16Type */ 1468 typedef struct { 1469 icTagBase base; /* Signature, "uf32" */ 1470 icU16Fixed16Array data; /* Variable array of values */ 1471 } icU16Fixed16ArrayType; 1472 1473 /** Under color removal, black generation type */ 1474 typedef struct { 1475 icTagBase base; /* Signature, "bfd " */ 1476 icUcrBg data; /* ucrBg structure */ 1477 } icUcrBgType; 1478 1479 /** uInt16Type */ 1480 typedef struct { 1481 icTagBase base; /* Signature, "ui16" */ 1482 icUInt16Array data; /* Variable array of values */ 1483 } icUInt16ArrayType; 1484 1485 /** uInt32Type */ 1486 typedef struct { 1487 icTagBase base; /* Signature, "ui32" */ 1488 icUInt32Array data; /* Variable array of values */ 1489 } icUInt32ArrayType; 1490 1491 /** uInt64Type */ 1492 typedef struct { 1493 icTagBase base; /* Signature, "ui64" */ 1494 icUInt64Array data; /* Variable array of values */ 1495 } icUInt64ArrayType; 1496 1497 /** uInt8Type */ 1498 typedef struct { 1499 icTagBase base; /* Signature, "ui08" */ 1500 icUInt8Array data; /* Variable array of values */ 1501 } icUInt8ArrayType; 1502 1503 /** viewingConditionsType */ 1504 typedef struct { 1505 icTagBase base; /* Signature, "view" */ 1506 icViewingCondition view; /* Viewing conditions */ 1507 } icViewingConditionType; 1508 1509 /** XYZ Type */ 1510 typedef struct { 1511 icTagBase base; /* Signature, "XYZ" */ 1512 icXYZArray data; /* Variable array of XYZ numbers */ 1513 } icXYZType; 1514 1515 /** 1516 * CRDInfoType where [0] is the CRD product name count and string and 1517 * [1] -[5] are the rendering intents 0-4 counts and strings 1518 */ 1519 typedef struct { 1520 icTagBase base; /* Signature, "crdi" */ 1521 icCrdInfo info; /* 5 sets of counts & strings */ 1522 }icCrdInfoType; 1523 /* icCrdInfo productName; PS product count/string */ 1524 /* icCrdInfo CRDName0; CRD name for intent 0 */ 1525 /* icCrdInfo CRDName1; CRD name for intent 1 */ 1526 /* icCrdInfo CRDName2; CRD name for intent 2 */ 1527 /* icCrdInfo CRDName3; CRD name for intent 3 */ 1528 1529 /** ColorantOrderType type */ 1530 typedef struct { 1531 icTagBase base; /* Signature, "clro" */ 1532 icColorantOrder order; /* ColorantOrder */ 1533 }icColorantOrderType; 1534 1535 /** ColorantTableType type */ 1536 typedef struct { 1537 icTagBase base; /* Signature, "clrt" */ 1538 icColorantTable table; /* ColorantTable */ 1539 }icColorantTableType; 1540 1541 /** ChromaticAdaptation type */ 1542 typedef struct { 1543 icTagBase base; /* Signature, "chad" */ 1544 icS15Fixed16Number matrix[9]; /* ChromaticAdaptation Matrix */ 1545 }icChromaticAdaptationType; 1546 1547 /** MultiLocalizedUnicodeEntry type */ 1548 typedef struct { 1549 icUInt16Number languageCode; /* name language code ISO-639 */ 1550 icUInt16Number countryCode; /* name country code ISO-3166 */ 1551 icUInt32Number len; /* string length in bytes */ 1552 icUInt32Number off; /* offset in bytes from start of tag */ 1553 }icMultiLocalizedUnicodeEntry; 1554 1555 /** MultiLocalizedUnicode type */ 1556 typedef struct { 1557 icTagBase base; /* Signature, "mluc" */ 1558 icUInt32Number count; /* Count of name records */ 1559 icUInt32Number size; /* name record size */ 1560 }icMultiLocalizedUnicodeType; 1561 1562 /*------------------------------------------------------------------------*/ 1563 1564 /** 1565 * Lists of tags, tags, profile header and profile structure 1566 */ 1567 1568 /** A tag */ 1569 typedef struct { 1570 icTagSignature sig; /* The tag signature */ 1571 icUInt32Number offset; /* Start of tag relative to 1572 * start of header, Spec 1573 * Clause 5 */ 1574 icUInt32Number size; /* Size in bytes */ 1575 } icTag; 1576 1577 /** A Structure that may be used independently for a list of tags */ 1578 typedef struct { 1579 icUInt32Number count; /* Number of tags in the profile */ 1580 icTag tags[icAny]; /* Variable array of tags */ 1581 } icTagList; 1582 1583 /** Profile ID */ 1584 typedef union { 1585 icUInt8Number ID8[16]; 1586 icUInt16Number ID16[8]; 1587 icUInt32Number ID32[4]; 1588 } icProfileID; 1589 1590 /** The Profile header */ 1591 typedef struct { 1592 icUInt32Number size; /* Profile size in bytes */ 1593 icSignature cmmId; /* CMM for this profile */ 1594 icUInt32Number version; /* Format version number */ 1595 icProfileClassSignature deviceClass; /* Type of profile */ 1596 icColorSpaceSignature colorSpace; /* Color space of data */ 1597 icColorSpaceSignature pcs; /* PCS, XYZ or Lab only */ 1598 icDateTimeNumber date; /* Date profile was created */ 1599 icSignature magic; /* icMagicNumber */ 1600 icPlatformSignature platform; /* Primary Platform */ 1601 icUInt32Number flags; /* Various bit settings */ 1602 icSignature manufacturer; /* Device manufacturer */ 1603 icUInt32Number model; /* Device model number */ 1604 icUInt64Number attributes; /* Device attributes */ 1605 icUInt32Number renderingIntent;/* Rendering intent */ 1606 icXYZNumber illuminant; /* Profile illuminant */ 1607 icSignature creator; /* Profile creator */ 1608 icProfileID profileID; /* Profile ID using RFC 1321 MD5 128bit fingerprinting */ 1609 icInt8Number reserved[28]; /* Reserved for future use */ 1610 } icHeader; 1611 1612 /** 1613 * A profile, 1614 * we can't use icTagList here because its not at the end of the structure 1615 */ 1616 typedef struct { 1617 icHeader header; /* The header */ 1618 icTagList tagList; /* with tagList */ 1619 /* Original: 1620 icHeader header; The header 1621 icUInt32Number count; Number of tags in the profile 1622 icInt8Number data[icAny]; The tagTable and tagData */ 1623 /* 1624 * Data that follows is of the form 1625 * 1626 * icTag tagTable[icAny]; * The tag table 1627 * icInt8Number tagData[icAny]; * The tag data 1628 */ 1629 } icProfile; 1630 1631 /*------------------------------------------------------------------------*/ 1632 /* Obsolete entries */ 1633 1634 /* icNamedColor was replaced with icNamedColor2 * 1635 typedef struct { 1636 icUInt32Number vendorFlag; / Bottom 16 bits for IC use * 1637 icUInt32Number count; / Count of named colors * 1638 icInt8Number data[icAny]; / Named color data follows * 1639 * 1640 * Data that follows is of this form 1641 * 1642 * icInt8Number prefix[icAny]; * Prefix for the color name, max = 32 1643 * icInt8Number suffix[icAny]; * Suffix for the color name, max = 32 1644 * icInt8Number root1[icAny]; * Root name for first color, max = 32 1645 * icInt8Number coords1[icAny]; * Color coordinates of first color 1646 * icInt8Number root2[icAny]; * Root name for first color, max = 32 1647 * icInt8Number coords2[icAny]; * Color coordinates of first color 1648 * : 1649 * : 1650 * Repeat for root name and color coordinates up to (count-1) 1651 * 1652 } icNamedColor; */ 1653 1654 /* icNamedColorType was replaced by icNamedColor2Type * 1655 typedef struct { 1656 icTagBase base; / Signature, "ncol" * 1657 icNamedColor ncolor; / Named color data * 1658 } icNamedColorType; */ 1659 1660 #endif /* icPROFILEHEADER_H */ 1661 1662 1663 1664 1665