1 /* Header file guard bands */
5 /*****************************************************************
6 Copyright (c) 1994-1996 SunSoft, Inc.
10 Permission is hereby granted, free of charge, to any person
11 obtaining a copy of this software and associated documentation
12 files (the "Software"), to deal in the Software without restrict-
13 ion, including without limitation the rights to use, copy, modify,
14 merge, publish distribute, sublicense, and/or sell copies of the
15 Software, and to permit persons to whom the Software is furnished
16 to do so, subject to the following conditions:
18 The above copyright notice and this permission notice shall be
19 included in all copies or substantial portions of the Software.
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
23 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-
24 INFRINGEMENT. IN NO EVENT SHALL SUNSOFT, INC. OR ITS PARENT
25 COMPANY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28 OTHER DEALINGS IN THE SOFTWARE.
30 Except as contained in this notice, the name of SunSoft, Inc.
31 shall not be used in advertising or otherwise to promote the
32 sale, use or other dealings in this Software without written
33 authorization from SunSoft Inc.
34 ******************************************************************/
37 * This version of the header file corresponds to the profile
38 * specification version 3.4.
40 * All header file entries are pre-fixed with "ic" to help
41 * avoid name space collisions. Signatures are pre-fixed with
44 * The structures defined in this header file were created to
45 * represent a description of an ICC profile on disk. Rather
46 * than use pointers a technique is used where a single byte array
47 * was placed at the end of each structure. This allows us in "C"
48 * to extend the structure by allocating more data than is needed
49 * to account for variable length structures.
51 * This also ensures that data following is allocated
52 * contiguously and makes it easier to write and read data from
55 * For example to allocate space for a 256 count length UCR
56 * and BG array, and fill the allocated data. Note strlen + 1
57 * to remember NULL terminator.
59 icUcrBgCurve *ucrCurve, *bgCurve;
60 int ucr_nbytes, bg_nbytes, string_bytes;
62 char ucr_string[100], *ucr_char;
64 strcpy(ucr_string, "Example ucrBG curves");
65 ucr_nbytes = sizeof(icUInt32Number) +
66 (UCR_CURVE_SIZE * sizeof(icUInt16Number));
67 bg_nbytes = sizeof(icUInt32Number) +
68 (BG_CURVE_SIZE * sizeof(icUInt16Number));
69 string_bytes = strlen(ucr_string) + 1;
71 ucrBgWrite = (icUcrBg *)malloc(
72 (ucr_nbytes + bg_nbytes + string_bytes));
74 ucrCurve = (icUcrBgCurve *)ucrBgWrite->data;
75 ucrCurve->count = UCR_CURVE_SIZE;
76 for (i=0; i<ucrCurve->count; i++)
77 ucrCurve->curve[i] = (icUInt16Number)i;
79 bgCurve = (icUcrBgCurve *)((char *)ucrCurve + ucr_nbytes);
80 bgCurve->count = BG_CURVE_SIZE;
81 for (i=0; i<bgCurve->count; i++)
82 bgCurve->curve[i] = 255 - (icUInt16Number)i;
84 ucr_char = (char *)((char *)bgCurve + bg_nbytes);
85 memcpy(ucr_char, ucr_string, string_bytes);
90 * Many of the structures contain variable length arrays. This
91 * is represented by the use of the convention.
96 /*------------------------------------------------------------------------*/
98 * Defines used in the specification
100 #define icMagicNumber 0x61637370L /* 'acsp' */
101 #define icVersionNumber 0x02100000L /* 2.1.0, BCD */
103 /* Screening Encodings */
104 #define icPrtrDefaultScreensFalse 0x00000000L /* Bit pos 0 */
105 #define icPrtrDefaultScreensTrue 0x00000001L /* Bit pos 0 */
106 #define icLinesPerInch 0x00000002L /* Bit pos 1 */
107 #define icLinesPerCm 0x00000000L /* Bit pos 1 */
110 * Device attributes, currently defined values correspond
111 * to the low 4 bytes of the 8 byte attribute quantity, see
112 * the header for their location.
114 #define icReflective 0x00000000L /* Bit pos 0 */
115 #define icTransparency 0x00000001L /* Bit pos 0 */
116 #define icGlossy 0x00000000L /* Bit pos 1 */
117 #define icMatte 0x00000002L /* Bit pos 1 */
120 * Profile header flags, the low 16 bits are reserved for consortium
123 #define icEmbeddedProfileFalse 0x00000000L /* Bit pos 0 */
124 #define icEmbeddedProfileTrue 0x00000001L /* Bit pos 0 */
125 #define icUseAnywhere 0x00000000L /* Bit pos 1 */
126 #define icUseWithEmbeddedDataOnly 0x00000002L /* Bit pos 1 */
128 /* Ascii or Binary data */
129 #define icAsciiData 0x00000000L
130 #define icBinaryData 0x00000001L
133 * Define used to indicate that this is a variable length array
138 /*------------------------------------------------------------------------*/
140 * Use this area to translate platform definitions of long
141 * etc into icXXX form. The rest of the header uses the icXXX
142 * typedefs. Signatures are 4 byte quantities.
149 June 9, 2003, Adapted for use with configure by Bob Friesenhahn
150 Added the stupid check for autoconf by Marti Maria.
151 PACKAGE_NAME is defined if autoconf is being used
154 typedef @UINT8_T@ icUInt8Number
;
155 typedef @UINT16_T@ icUInt16Number
;
156 typedef @UINT32_T@ icUInt32Number
;
157 typedef @UINT32_T@ icUInt64Number
[2];
159 typedef @INT8_T@ icInt8Number
;
160 typedef @INT16_T@ icInt16Number
;
161 typedef @INT32_T@ icInt32Number
;
162 typedef @INT32_T@ icInt64Number
[2];
167 *Apr-17-2002: Modified by Marti Maria in order to provide wider portability.
170 #if defined (__digital__) && defined (__unix__)
174 #include <inttypes.h>
176 typedef uint8_t icUInt8Number
;
177 typedef uint16_t icUInt16Number
;
178 typedef uint32_t icUInt32Number
;
179 typedef uint32_t icUInt64Number
[2];
181 typedef int8_t icInt8Number
;
182 typedef int16_t icInt16Number
;
183 typedef int32_t icInt32Number
;
184 typedef int32_t icInt64Number
[2];
195 /* Unsigned integer numbers */
196 typedef unsigned char icUInt8Number
;
197 typedef unsigned short icUInt16Number
;
198 typedef __uint32_t icUInt32Number
;
199 typedef __uint32_t icUInt64Number
[2];
202 typedef char icInt8Number
;
203 typedef short icInt16Number
;
204 typedef __int32_t icInt32Number
;
205 typedef __int32_t icInt64Number
[2];
209 #if defined(__GNUC__) || defined(__unix__) || defined(__unix)
211 #include <sys/types.h>
213 #if defined(__sun) || defined(__hpux) || defined (__MINGW) || defined(__MINGW32__)
215 #if defined (__MINGW) || defined(__MINGW32__)
220 typedef uint8_t icUInt8Number
;
221 typedef uint16_t icUInt16Number
;
222 typedef uint32_t icUInt32Number
;
223 typedef uint32_t icUInt64Number
[2];
227 /* Unsigned integer numbers */
228 typedef u_int8_t icUInt8Number
;
229 typedef u_int16_t icUInt16Number
;
230 typedef u_int32_t icUInt32Number
;
231 typedef u_int32_t icUInt64Number
[2];
237 typedef int8_t icInt8Number
;
238 typedef int16_t icInt16Number
;
239 typedef int32_t icInt32Number
;
240 typedef int32_t icInt64Number
[2];
243 #else /* default definitions */
249 /* Unsigned integer numbers */
250 typedef unsigned char icUInt8Number
;
251 typedef unsigned short icUInt16Number
;
252 typedef unsigned long icUInt32Number
;
253 typedef unsigned long icUInt64Number
[2];
256 typedef char icInt8Number
;
257 typedef short icInt16Number
;
258 typedef long icInt32Number
;
259 typedef long icInt64Number
[2];
262 #endif /* default defs */
269 typedef icInt32Number icSignature
;
270 typedef icInt32Number icS15Fixed16Number
;
271 typedef icUInt32Number icU16Fixed16Number
;
274 /*------------------------------------------------------------------------*/
275 /* public tags and sizes */
277 icSigAToB0Tag
= 0x41324230L
, /* 'A2B0' */
278 icSigAToB1Tag
= 0x41324231L
, /* 'A2B1' */
279 icSigAToB2Tag
= 0x41324232L
, /* 'A2B2' */
280 icSigBlueColorantTag
= 0x6258595AL
, /* 'bXYZ' */
281 icSigBlueTRCTag
= 0x62545243L
, /* 'bTRC' */
282 icSigBToA0Tag
= 0x42324130L
, /* 'B2A0' */
283 icSigBToA1Tag
= 0x42324131L
, /* 'B2A1' */
284 icSigBToA2Tag
= 0x42324132L
, /* 'B2A2' */
285 icSigCalibrationDateTimeTag
= 0x63616C74L
, /* 'calt' */
286 icSigCharTargetTag
= 0x74617267L
, /* 'targ' */
287 icSigCopyrightTag
= 0x63707274L
, /* 'cprt' */
288 icSigCrdInfoTag
= 0x63726469L
, /* 'crdi' */
289 icSigDeviceMfgDescTag
= 0x646D6E64L
, /* 'dmnd' */
290 icSigDeviceModelDescTag
= 0x646D6464L
, /* 'dmdd' */
291 icSigGamutTag
= 0x67616D74L
, /* 'gamt ' */
292 icSigGrayTRCTag
= 0x6b545243L
, /* 'kTRC' */
293 icSigGreenColorantTag
= 0x6758595AL
, /* 'gXYZ' */
294 icSigGreenTRCTag
= 0x67545243L
, /* 'gTRC' */
295 icSigLuminanceTag
= 0x6C756d69L
, /* 'lumi' */
296 icSigMeasurementTag
= 0x6D656173L
, /* 'meas' */
297 icSigMediaBlackPointTag
= 0x626B7074L
, /* 'bkpt' */
298 icSigMediaWhitePointTag
= 0x77747074L
, /* 'wtpt' */
299 icSigNamedColorTag
= 0x6E636f6CL
, /* 'ncol'
300 * OBSOLETE, use ncl2 */
301 icSigNamedColor2Tag
= 0x6E636C32L
, /* 'ncl2' */
302 icSigPreview0Tag
= 0x70726530L
, /* 'pre0' */
303 icSigPreview1Tag
= 0x70726531L
, /* 'pre1' */
304 icSigPreview2Tag
= 0x70726532L
, /* 'pre2' */
305 icSigProfileDescriptionTag
= 0x64657363L
, /* 'desc' */
306 icSigProfileSequenceDescTag
= 0x70736571L
, /* 'pseq' */
307 icSigPs2CRD0Tag
= 0x70736430L
, /* 'psd0' */
308 icSigPs2CRD1Tag
= 0x70736431L
, /* 'psd1' */
309 icSigPs2CRD2Tag
= 0x70736432L
, /* 'psd2' */
310 icSigPs2CRD3Tag
= 0x70736433L
, /* 'psd3' */
311 icSigPs2CSATag
= 0x70733273L
, /* 'ps2s' */
312 icSigPs2RenderingIntentTag
= 0x70733269L
, /* 'ps2i' */
313 icSigRedColorantTag
= 0x7258595AL
, /* 'rXYZ' */
314 icSigRedTRCTag
= 0x72545243L
, /* 'rTRC' */
315 icSigScreeningDescTag
= 0x73637264L
, /* 'scrd' */
316 icSigScreeningTag
= 0x7363726EL
, /* 'scrn' */
317 icSigTechnologyTag
= 0x74656368L
, /* 'tech' */
318 icSigUcrBgTag
= 0x62666420L
, /* 'bfd ' */
319 icSigViewingCondDescTag
= 0x76756564L
, /* 'vued' */
320 icSigViewingConditionsTag
= 0x76696577L
, /* 'view' */
321 icMaxEnumTag
= 0xFFFFFFFFL
324 /* technology signature descriptions */
326 icSigDigitalCamera
= 0x6463616DL
, /* 'dcam' */
327 icSigFilmScanner
= 0x6673636EL
, /* 'fscn' */
328 icSigReflectiveScanner
= 0x7273636EL
, /* 'rscn' */
329 icSigInkJetPrinter
= 0x696A6574L
, /* 'ijet' */
330 icSigThermalWaxPrinter
= 0x74776178L
, /* 'twax' */
331 icSigElectrophotographicPrinter
= 0x6570686FL
, /* 'epho' */
332 icSigElectrostaticPrinter
= 0x65737461L
, /* 'esta' */
333 icSigDyeSublimationPrinter
= 0x64737562L
, /* 'dsub' */
334 icSigPhotographicPaperPrinter
= 0x7270686FL
, /* 'rpho' */
335 icSigFilmWriter
= 0x6670726EL
, /* 'fprn' */
336 icSigVideoMonitor
= 0x7669646DL
, /* 'vidm' */
337 icSigVideoCamera
= 0x76696463L
, /* 'vidc' */
338 icSigProjectionTelevision
= 0x706A7476L
, /* 'pjtv' */
339 icSigCRTDisplay
= 0x43525420L
, /* 'CRT ' */
340 icSigPMDisplay
= 0x504D4420L
, /* 'PMD ' */
341 icSigAMDisplay
= 0x414D4420L
, /* 'AMD ' */
342 icSigPhotoCD
= 0x4B504344L
, /* 'KPCD' */
343 icSigPhotoImageSetter
= 0x696D6773L
, /* 'imgs' */
344 icSigGravure
= 0x67726176L
, /* 'grav' */
345 icSigOffsetLithography
= 0x6F666673L
, /* 'offs' */
346 icSigSilkscreen
= 0x73696C6BL
, /* 'silk' */
347 icSigFlexography
= 0x666C6578L
, /* 'flex' */
348 icMaxEnumTechnology
= 0xFFFFFFFFL
349 } icTechnologySignature
;
351 /* type signatures */
353 icSigCurveType
= 0x63757276L
, /* 'curv' */
354 icSigDataType
= 0x64617461L
, /* 'data' */
355 icSigDateTimeType
= 0x6474696DL
, /* 'dtim' */
356 icSigLut16Type
= 0x6d667432L
, /* 'mft2' */
357 icSigLut8Type
= 0x6d667431L
, /* 'mft1' */
358 icSigMeasurementType
= 0x6D656173L
, /* 'meas' */
359 icSigNamedColorType
= 0x6E636f6CL
, /* 'ncol'
360 * OBSOLETE, use ncl2 */
361 icSigProfileSequenceDescType
= 0x70736571L
, /* 'pseq' */
362 icSigS15Fixed16ArrayType
= 0x73663332L
, /* 'sf32' */
363 icSigScreeningType
= 0x7363726EL
, /* 'scrn' */
364 icSigSignatureType
= 0x73696720L
, /* 'sig ' */
365 icSigTextType
= 0x74657874L
, /* 'text' */
366 icSigTextDescriptionType
= 0x64657363L
, /* 'desc' */
367 icSigU16Fixed16ArrayType
= 0x75663332L
, /* 'uf32' */
368 icSigUcrBgType
= 0x62666420L
, /* 'bfd ' */
369 icSigUInt16ArrayType
= 0x75693136L
, /* 'ui16' */
370 icSigUInt32ArrayType
= 0x75693332L
, /* 'ui32' */
371 icSigUInt64ArrayType
= 0x75693634L
, /* 'ui64' */
372 icSigUInt8ArrayType
= 0x75693038L
, /* 'ui08' */
373 icSigViewingConditionsType
= 0x76696577L
, /* 'view' */
374 icSigXYZType
= 0x58595A20L
, /* 'XYZ ' */
375 icSigXYZArrayType
= 0x58595A20L
, /* 'XYZ ' */
376 icSigNamedColor2Type
= 0x6E636C32L
, /* 'ncl2' */
377 icSigCrdInfoType
= 0x63726469L
, /* 'crdi' */
378 icMaxEnumType
= 0xFFFFFFFFL
379 } icTagTypeSignature
;
382 * Color Space Signatures
383 * Note that only icSigXYZData and icSigLabData are valid
384 * Profile Connection Spaces (PCSs)
387 icSigXYZData
= 0x58595A20L
, /* 'XYZ ' */
388 icSigLabData
= 0x4C616220L
, /* 'Lab ' */
389 icSigLuvData
= 0x4C757620L
, /* 'Luv ' */
390 icSigYCbCrData
= 0x59436272L
, /* 'YCbr' */
391 icSigYxyData
= 0x59787920L
, /* 'Yxy ' */
392 icSigRgbData
= 0x52474220L
, /* 'RGB ' */
393 icSigGrayData
= 0x47524159L
, /* 'GRAY' */
394 icSigHsvData
= 0x48535620L
, /* 'HSV ' */
395 icSigHlsData
= 0x484C5320L
, /* 'HLS ' */
396 icSigCmykData
= 0x434D594BL
, /* 'CMYK' */
397 icSigCmyData
= 0x434D5920L
, /* 'CMY ' */
398 icSig2colorData
= 0x32434C52L
, /* '2CLR' */
399 icSig3colorData
= 0x33434C52L
, /* '3CLR' */
400 icSig4colorData
= 0x34434C52L
, /* '4CLR' */
401 icSig5colorData
= 0x35434C52L
, /* '5CLR' */
402 icSig6colorData
= 0x36434C52L
, /* '6CLR' */
403 icSig7colorData
= 0x37434C52L
, /* '7CLR' */
404 icSig8colorData
= 0x38434C52L
, /* '8CLR' */
405 icSig9colorData
= 0x39434C52L
, /* '9CLR' */
406 icSig10colorData
= 0x41434C52L
, /* 'ACLR' */
407 icSig11colorData
= 0x42434C52L
, /* 'BCLR' */
408 icSig12colorData
= 0x43434C52L
, /* 'CCLR' */
409 icSig13colorData
= 0x44434C52L
, /* 'DCLR' */
410 icSig14colorData
= 0x45434C52L
, /* 'ECLR' */
411 icSig15colorData
= 0x46434C52L
, /* 'FCLR' */
412 icMaxEnumData
= 0xFFFFFFFFL
413 } icColorSpaceSignature
;
415 /* profileClass enumerations */
417 icSigInputClass
= 0x73636E72L
, /* 'scnr' */
418 icSigDisplayClass
= 0x6D6E7472L
, /* 'mntr' */
419 icSigOutputClass
= 0x70727472L
, /* 'prtr' */
420 icSigLinkClass
= 0x6C696E6BL
, /* 'link' */
421 icSigAbstractClass
= 0x61627374L
, /* 'abst' */
422 icSigColorSpaceClass
= 0x73706163L
, /* 'spac' */
423 icSigNamedColorClass
= 0x6e6d636cL
, /* 'nmcl' */
424 icMaxEnumClass
= 0xFFFFFFFFL
425 } icProfileClassSignature
;
427 /* Platform Signatures */
429 icSigMacintosh
= 0x4150504CL
, /* 'APPL' */
430 icSigMicrosoft
= 0x4D534654L
, /* 'MSFT' */
431 icSigSolaris
= 0x53554E57L
, /* 'SUNW' */
432 icSigSGI
= 0x53474920L
, /* 'SGI ' */
433 icSigTaligent
= 0x54474E54L
, /* 'TGNT' */
434 icMaxEnumPlatform
= 0xFFFFFFFFL
435 } icPlatformSignature
;
437 /*------------------------------------------------------------------------*/
442 /* Measurement Flare, used in the measurmentType tag */
444 icFlare0
= 0x00000000L
, /* 0% flare */
445 icFlare100
= 0x00000001L
, /* 100% flare */
446 icMaxFlare
= 0xFFFFFFFFL
447 } icMeasurementFlare
;
449 /* Measurement Geometry, used in the measurmentType tag */
451 icGeometryUnknown
= 0x00000000L
, /* Unknown */
452 icGeometry045or450
= 0x00000001L
, /* 0/45, 45/0 */
453 icGeometry0dord0
= 0x00000002L
, /* 0/d or d/0 */
454 icMaxGeometry
= 0xFFFFFFFFL
455 } icMeasurementGeometry
;
457 /* Rendering Intents, used in the profile header */
460 icRelativeColorimetric
= 1,
462 icAbsoluteColorimetric
= 3,
463 icMaxEnumIntent
= 0xFFFFFFFFL
466 /* Different Spot Shapes currently defined, used for screeningType */
468 icSpotShapeUnknown
= 0,
469 icSpotShapePrinterDefault
= 1,
470 icSpotShapeRound
= 2,
471 icSpotShapeDiamond
= 3,
472 icSpotShapeEllipse
= 4,
474 icSpotShapeSquare
= 6,
475 icSpotShapeCross
= 7,
476 icMaxEnumSpot
= 0xFFFFFFFFL
479 /* Standard Observer, used in the measurmentType tag */
481 icStdObsUnknown
= 0x00000000L
, /* Unknown */
482 icStdObs1931TwoDegrees
= 0x00000001L
, /* 2 deg */
483 icStdObs1964TenDegrees
= 0x00000002L
, /* 10 deg */
484 icMaxStdObs
= 0xFFFFFFFFL
485 } icStandardObserver
;
487 /* Pre-defined illuminants, used in measurement and viewing conditions type */
489 icIlluminantUnknown
= 0x00000000L
,
490 icIlluminantD50
= 0x00000001L
,
491 icIlluminantD65
= 0x00000002L
,
492 icIlluminantD93
= 0x00000003L
,
493 icIlluminantF2
= 0x00000004L
,
494 icIlluminantD55
= 0x00000005L
,
495 icIlluminantA
= 0x00000006L
,
496 icIlluminantEquiPowerE
= 0x00000007L
,
497 icIlluminantF8
= 0x00000008L
,
498 icMaxEnumIluminant
= 0xFFFFFFFFL
502 /*------------------------------------------------------------------------*/
509 icInt8Number data
[icAny
]; /* Variable array of values */
514 icUInt8Number data
[icAny
]; /* Variable array of values */
519 icUInt16Number data
[icAny
]; /* Variable array of values */
524 icInt16Number data
[icAny
]; /* Variable array of values */
529 icUInt32Number data
[icAny
]; /* Variable array of values */
534 icInt32Number data
[icAny
]; /* Variable array of values */
539 icUInt64Number data
[icAny
]; /* Variable array of values */
544 icInt64Number data
[icAny
]; /* Variable array of values */
547 /* u16Fixed16 Array */
549 icU16Fixed16Number data
[icAny
]; /* Variable array of values */
552 /* s15Fixed16 Array */
554 icS15Fixed16Number data
[icAny
]; /* Variable array of values */
557 /* The base date time number */
560 icUInt16Number month
;
562 icUInt16Number hours
;
563 icUInt16Number minutes
;
564 icUInt16Number seconds
;
569 icS15Fixed16Number X
;
570 icS15Fixed16Number Y
;
571 icS15Fixed16Number Z
;
576 icXYZNumber data
[icAny
]; /* Variable array of XYZ numbers */
581 icUInt32Number count
; /* Number of entries */
582 icUInt16Number data
[icAny
]; /* The actual table data, real
583 * number is determined by count
584 * Interpretation depends on how
585 * data is used with a given tag
591 icUInt32Number dataFlag
; /* 0 = ascii, 1 = binary */
592 icInt8Number data
[icAny
]; /* Data, size from tag */
597 icUInt8Number inputChan
; /* Number of input channels */
598 icUInt8Number outputChan
; /* Number of output channels */
599 icUInt8Number clutPoints
; /* Number of grid points */
600 icInt8Number pad
; /* Padding for byte alignment */
601 icS15Fixed16Number e00
; /* e00 in the 3 * 3 */
602 icS15Fixed16Number e01
; /* e01 in the 3 * 3 */
603 icS15Fixed16Number e02
; /* e02 in the 3 * 3 */
604 icS15Fixed16Number e10
; /* e10 in the 3 * 3 */
605 icS15Fixed16Number e11
; /* e11 in the 3 * 3 */
606 icS15Fixed16Number e12
; /* e12 in the 3 * 3 */
607 icS15Fixed16Number e20
; /* e20 in the 3 * 3 */
608 icS15Fixed16Number e21
; /* e21 in the 3 * 3 */
609 icS15Fixed16Number e22
; /* e22 in the 3 * 3 */
610 icUInt16Number inputEnt
; /* Num of in-table entries */
611 icUInt16Number outputEnt
; /* Num of out-table entries */
612 icUInt16Number data
[icAny
]; /* Data follows see spec */
614 * Data that follows is of this form
616 * icUInt16Number inputTable[inputChan][icAny]; * The in-table
617 * icUInt16Number clutTable[icAny]; * The clut
618 * icUInt16Number outputTable[outputChan][icAny]; * The out-table
622 /* lut8, input & output tables are always 256 bytes in length */
624 icUInt8Number inputChan
; /* Num of input channels */
625 icUInt8Number outputChan
; /* Num of output channels */
626 icUInt8Number clutPoints
; /* Num of grid points */
628 icS15Fixed16Number e00
; /* e00 in the 3 * 3 */
629 icS15Fixed16Number e01
; /* e01 in the 3 * 3 */
630 icS15Fixed16Number e02
; /* e02 in the 3 * 3 */
631 icS15Fixed16Number e10
; /* e10 in the 3 * 3 */
632 icS15Fixed16Number e11
; /* e11 in the 3 * 3 */
633 icS15Fixed16Number e12
; /* e12 in the 3 * 3 */
634 icS15Fixed16Number e20
; /* e20 in the 3 * 3 */
635 icS15Fixed16Number e21
; /* e21 in the 3 * 3 */
636 icS15Fixed16Number e22
; /* e22 in the 3 * 3 */
637 icUInt8Number data
[icAny
]; /* Data follows see spec */
639 * Data that follows is of this form
641 * icUInt8Number inputTable[inputChan][256]; * The in-table
642 * icUInt8Number clutTable[icAny]; * The clut
643 * icUInt8Number outputTable[outputChan][256]; * The out-table
647 /* Measurement Data */
649 icStandardObserver stdObserver
; /* Standard observer */
650 icXYZNumber backing
; /* XYZ for backing */
651 icMeasurementGeometry geometry
; /* Meas. geometry */
652 icMeasurementFlare flare
; /* Measurement flare */
653 icIlluminant illuminant
; /* Illuminant */
659 * icNamedColor2 takes the place of icNamedColor
662 icUInt32Number vendorFlag
; /* Bottom 16 bits for IC use */
663 icUInt32Number count
; /* Count of named colors */
664 icUInt32Number nDeviceCoords
; /* Num of device coordinates */
665 icInt8Number prefix
[32]; /* Prefix for each color name */
666 icInt8Number suffix
[32]; /* Suffix for each color name */
667 icInt8Number data
[icAny
]; /* Named color data follows */
669 * Data that follows is of this form
671 * icInt8Number root1[32]; * Root name for 1st color
672 * icUInt16Number pcsCoords1[icAny]; * PCS coords of 1st color
673 * icUInt16Number deviceCoords1[icAny]; * Dev coords of 1st color
674 * icInt8Number root2[32]; * Root name for 2nd color
675 * icUInt16Number pcsCoords2[icAny]; * PCS coords of 2nd color
676 * icUInt16Number deviceCoords2[icAny]; * Dev coords of 2nd color
679 * Repeat for name and PCS and device color coordinates up to (count-1)
682 * PCS and device space can be determined from the header.
684 * PCS coordinates are icUInt16 numbers and are described in Annex A of
685 * the ICC spec. Only 16 bit L*a*b* and XYZ are allowed. The number of
686 * coordinates is consistent with the headers PCS.
688 * Device coordinates are icUInt16 numbers where 0x0000 represents
689 * the minimum value and 0xFFFF represents the maximum value.
690 * If the nDeviceCoords value is 0 this field is not given.
694 /* Profile sequence structure */
696 icSignature deviceMfg
; /* Dev Manufacturer */
697 icSignature deviceModel
; /* Dev Model */
698 icUInt64Number attributes
; /* Dev attributes */
699 icTechnologySignature technology
; /* Technology sig */
700 icInt8Number data
[icAny
]; /* Desc text follows */
702 * Data that follows is of this form, this is an icInt8Number
703 * to avoid problems with a compiler generating bad code as
704 * these arrays are variable in length.
706 * icTextDescription deviceMfgDesc; * Manufacturer text
707 * icTextDescription modelDesc; * Model text
711 /* Profile sequence description */
713 icUInt32Number count
; /* Number of descriptions */
714 icUInt8Number data
[icAny
]; /* Array of desc structs */
715 } icProfileSequenceDesc
;
717 /* textDescription */
719 icUInt32Number count
; /* Description length */
720 icInt8Number data
[icAny
]; /* Descriptions follow */
722 * Data that follows is of this form
724 * icInt8Number desc[count] * NULL terminated ascii string
725 * icUInt32Number ucLangCode; * UniCode language code
726 * icUInt32Number ucCount; * UniCode description length
727 * icInt16Number ucDesc[ucCount];* The UniCode description
728 * icUInt16Number scCode; * ScriptCode code
729 * icUInt8Number scCount; * ScriptCode count
730 * icInt8Number scDesc[67]; * ScriptCode Description
736 icS15Fixed16Number frequency
; /* Frequency */
737 icS15Fixed16Number angle
; /* Screen angle */
738 icSpotShape spotShape
; /* Spot Shape encodings below */
742 icUInt32Number screeningFlag
; /* Screening flag */
743 icUInt32Number channels
; /* Number of channels */
744 icScreeningData data
[icAny
]; /* Array of screening data */
749 icInt8Number data
[icAny
]; /* Variable array of chars */
752 /* Structure describing either a UCR or BG curve */
754 icUInt32Number count
; /* Curve length */
755 icUInt16Number curve
[icAny
]; /* The array of curve values */
758 /* Under color removal, black generation */
760 icInt8Number data
[icAny
]; /* The Ucr BG data */
762 * Data that follows is of this form, this is a icInt8Number
763 * to avoid problems with a compiler generating bad code as
764 * these arrays are variable in length.
766 * icUcrBgCurve ucr; * Ucr curve
767 * icUcrBgCurve bg; * Bg curve
768 * icInt8Number string; * UcrBg description
772 /* viewingConditionsType */
774 icXYZNumber illuminant
; /* In candelas per sq. meter */
775 icXYZNumber surround
; /* In candelas per sq. meter */
776 icIlluminant stdIluminant
; /* See icIlluminant defines */
777 } icViewingCondition
;
781 icUInt32Number count
; /* Char count includes NULL */
782 icInt8Number desc
[icAny
]; /* Null terminated string */
785 /*------------------------------------------------------------------------*/
787 * Tag Type definitions
791 * Many of the structures contain variable length arrays. This
792 * is represented by the use of the convention.
797 /* The base part of each tag */
799 icTagTypeSignature sig
; /* Signature */
800 icInt8Number reserved
[4]; /* Reserved, set to 0 */
805 icTagBase base
; /* Signature, "curv" */
806 icCurve curve
; /* The curve data */
811 icTagBase base
; /* Signature, "data" */
812 icData data
; /* The data structure */
817 icTagBase base
; /* Signature, "dtim" */
818 icDateTimeNumber date
; /* The date */
823 icTagBase base
; /* Signature, "mft2" */
824 icLut16 lut
; /* Lut16 data */
827 /* lut8Type, input & output tables are always 256 bytes in length */
829 icTagBase base
; /* Signature, "mft1" */
830 icLut8 lut
; /* Lut8 data */
833 /* Measurement Type */
835 icTagBase base
; /* Signature, "meas" */
836 icMeasurement measurement
; /* Measurement data */
839 /* Named color type */
840 /* icNamedColor2Type, replaces icNamedColorType */
842 icTagBase base
; /* Signature, "ncl2" */
843 icNamedColor2 ncolor
; /* Named color data */
846 /* Profile sequence description type */
848 icTagBase base
; /* Signature, "pseq" */
849 icProfileSequenceDesc desc
; /* The seq description */
850 } icProfileSequenceDescType
;
852 /* textDescriptionType */
854 icTagBase base
; /* Signature, "desc" */
855 icTextDescription desc
; /* The description */
856 } icTextDescriptionType
;
860 icTagBase base
; /* Signature, "sf32" */
861 icS15Fixed16Array data
; /* Array of values */
862 } icS15Fixed16ArrayType
;
865 icTagBase base
; /* Signature, "scrn" */
866 icScreening screen
; /* Screening structure */
871 icTagBase base
; /* Signature, "sig" */
872 icSignature signature
; /* The signature data */
877 icTagBase base
; /* Signature, "text" */
878 icText data
; /* Variable array of chars */
883 icTagBase base
; /* Signature, "uf32" */
884 icU16Fixed16Array data
; /* Variable array of values */
885 } icU16Fixed16ArrayType
;
887 /* Under color removal, black generation type */
889 icTagBase base
; /* Signature, "bfd " */
890 icUcrBg data
; /* ucrBg structure */
895 icTagBase base
; /* Signature, "ui16" */
896 icUInt16Array data
; /* Variable array of values */
901 icTagBase base
; /* Signature, "ui32" */
902 icUInt32Array data
; /* Variable array of values */
907 icTagBase base
; /* Signature, "ui64" */
908 icUInt64Array data
; /* Variable array of values */
913 icTagBase base
; /* Signature, "ui08" */
914 icUInt8Array data
; /* Variable array of values */
917 /* viewingConditionsType */
919 icTagBase base
; /* Signature, "view" */
920 icViewingCondition view
; /* Viewing conditions */
921 } icViewingConditionType
;
925 icTagBase base
; /* Signature, "XYZ" */
926 icXYZArray data
; /* Variable array of XYZ nums */
929 /* CRDInfoType where [0] is the CRD product name count and string and
930 * [1] -[5] are the rendering intents 0-4 counts and strings
933 icTagBase base
; /* Signature, "crdi" */
934 icCrdInfo info
; /* 5 sets of counts & strings */
936 /* icCrdInfo productName; PS product count/string */
937 /* icCrdInfo CRDName0; CRD name for intent 0 */
938 /* icCrdInfo CRDName1; CRD name for intent 1 */
939 /* icCrdInfo CRDName2; CRD name for intent 2 */
940 /* icCrdInfo CRDName3; CRD name for intent 3 */
942 /*------------------------------------------------------------------------*/
945 * Lists of tags, tags, profile header and profile structure
950 icTagSignature sig
; /* The tag signature */
951 icUInt32Number offset
; /* Start of tag relative to
952 * start of header, Spec
954 icUInt32Number size
; /* Size in bytes */
957 /* A Structure that may be used independently for a list of tags */
959 icUInt32Number count
; /* Num tags in the profile */
960 icTag tags
[icAny
]; /* Variable array of tags */
963 /* The Profile header */
965 icUInt32Number size
; /* Prof size in bytes */
966 icSignature cmmId
; /* CMM for profile */
967 icUInt32Number version
; /* Format version */
968 icProfileClassSignature deviceClass
; /* Type of profile */
969 icColorSpaceSignature colorSpace
; /* Clr space of data */
970 icColorSpaceSignature pcs
; /* PCS, XYZ or Lab */
971 icDateTimeNumber date
; /* Creation Date */
972 icSignature magic
; /* icMagicNumber */
973 icPlatformSignature platform
; /* Primary Platform */
974 icUInt32Number flags
; /* Various bits */
975 icSignature manufacturer
; /* Dev manufacturer */
976 icUInt32Number model
; /* Dev model number */
977 icUInt64Number attributes
; /* Device attributes */
978 icUInt32Number renderingIntent
;/* Rendering intent */
979 icXYZNumber illuminant
; /* Profile illuminant */
980 icSignature creator
; /* Profile creator */
981 icInt8Number reserved
[44]; /* Reserved */
986 * we can't use icTagList here because its not at the end of the structure
989 icHeader header
; /* The header */
990 icUInt32Number count
; /* Num tags in the profile */
991 icInt8Number data
[icAny
]; /* The tagTable and tagData */
993 * Data that follows is of the form
995 * icTag tagTable[icAny]; * The tag table
996 * icInt8Number tagData[icAny]; * The tag data
1000 /*------------------------------------------------------------------------*/
1001 /* Obsolete entries */
1003 /* icNamedColor was replaced with icNamedColor2 */
1005 icUInt32Number vendorFlag
; /* Bottom 16 bits for IC use */
1006 icUInt32Number count
; /* Count of named colors */
1007 icInt8Number data
[icAny
]; /* Named color data follows */
1009 * Data that follows is of this form
1011 * icInt8Number prefix[icAny]; * Prefix
1012 * icInt8Number suffix[icAny]; * Suffix
1013 * icInt8Number root1[icAny]; * Root name
1014 * icInt8Number coords1[icAny]; * Color coordinates
1015 * icInt8Number root2[icAny]; * Root name
1016 * icInt8Number coords2[icAny]; * Color coordinates
1019 * Repeat for root name and color coordinates up to (count-1)
1023 /* icNamedColorType was replaced by icNamedColor2Type */
1025 icTagBase base
; /* Signature, "ncol" */
1026 icNamedColor ncolor
; /* Named color data */