1 /*
2  * Note: Modified for use by icclib V2.00:
3  *
4  * Changed guard bands from ICC_H to ICC9809_H
5  *
6  * Replace tag last values 0xFFFFFFFFL with define icMaxTagVal,
7  * and define this to be -1, for better compiler compatibility.
8  *
9  * Add section to use machine specific INR & ORD to define
10  * the sizes of ic Numbers, if ORD is defined.
11  *
12  * Adding colorspaces 'MCH5-8' for Hexachrome and others. (Colorsync ?)
13  * Added the Positive/Negative and Color/BlackAndWhite Attribute bits
14  *
15  * I believe icMeasurementFlare as an enumeration is bogus in
16  * this file. It is meant to be a u16.16 number.
17  *
18  * Add Chromaticity Tag and Type from ICC.1A:1999-04,
19  * but there is no formal "icc.h" from the ICC that indicates
20  * what the names should be.
21  *
22  * Added Colorsync 2.5 specific VideoCardGamma defines.
23  *
24  *  Graeme Gill.
25  */
26 
27 /* Header file guard bands */
28 #ifndef ICC9809_H
29 #define ICC9809_H
30 
31 /*****************************************************************
32  Copyright (c) 1994-1998 SunSoft, Inc.
33 
34                     Rights Reserved
35 
36 Permission is hereby granted, free of charge, to any person
37 obtaining a copy of this software and associated documentation
38 files (the "Software"), to deal in the Software without restrict-
39 ion, including without limitation the rights to use, copy, modify,
40 merge, publish distribute, sublicense, and/or sell copies of the
41 Software, and to permit persons to whom the Software is furnished
42 to do so, subject to the following conditions:
43 
44 The above copyright notice and this permission notice shall be
45 included in all copies or substantial portions of the Software.
46 
47 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
48 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
49 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-
50 INFRINGEMENT.  IN NO EVENT SHALL SUNSOFT, INC. OR ITS PARENT
51 COMPANY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
52 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
53 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
54 OTHER DEALINGS IN THE SOFTWARE.
55 
56 Except as contained in this notice, the name of SunSoft, Inc.
57 shall not be used in advertising or otherwise to promote the
58 sale, use or other dealings in this Software without written
59 authorization from SunSoft Inc.
60 ******************************************************************/
61 
62 /*
63  * This version of the header file corresponds to the profile
64  * Specification ICC.1:1998-09.
65  *
66  * All header file entries are pre-fixed with "ic" to help
67  * avoid name space collisions. Signatures are pre-fixed with
68  * icSig.
69  *
70  * The structures defined in this header file were created to
71  * represent a description of an ICC profile on disk. Rather
72  * than use pointers a technique is used where a single byte array
73  * was placed at the end of each structure. This allows us in "C"
74  * to extend the structure by allocating more data than is needed
75  * to account for variable length structures.
76  *
77  * This also ensures that data following is allocated
78  * contiguously and makes it easier to write and read data from
79  * the file.
80  *
81  * For example to allocate space for a 256 count length UCR
82  * and BG array, and fill the allocated data.  Note strlen + 1
83  * to remember NULL terminator.
84  *
85         icUcrBgCurve    *ucrCurve, *bgCurve;
86         int             ucr_nbytes, bg_nbytes, string_bytes;
87         icUcrBg         *ucrBgWrite;
88         char            ucr_string[100], *ucr_char;
89 
90         strcpy(ucr_string, "Example ucrBG curves");
91         ucr_nbytes = sizeof(icUInt32Number) +
92                  (UCR_CURVE_SIZE * sizeof(icUInt16Number));
93         bg_nbytes = sizeof(icUInt32Number) +
94                  (BG_CURVE_SIZE * sizeof(icUInt16Number));
95         string_bytes = strlen(ucr_string) + 1;
96 
97         ucrBgWrite = (icUcrBg *)malloc(
98                                 (ucr_nbytes + bg_nbytes + string_bytes));
99 
100         ucrCurve = (icUcrBgCurve *)ucrBgWrite->data;
101         ucrCurve->count = UCR_CURVE_SIZE;
102         for (i=0; i<ucrCurve->count; i++)
103                 ucrCurve->curve[i] = (icUInt16Number)i;
104 
105         bgCurve = (icUcrBgCurve *)((char *)ucrCurve + ucr_nbytes);
106         bgCurve->count = BG_CURVE_SIZE;
107         for (i=0; i<bgCurve->count; i++)
108                 bgCurve->curve[i] = 255 - (icUInt16Number)i;
109 
110         ucr_char = (char *)((char *)bgCurve + bg_nbytes);
111         memcpy(ucr_char, ucr_string, string_bytes);
112  *
113  */
114 
115 /*
116  * Many of the structures contain variable length arrays. This
117  * is represented by the use of the convention.
118  *
119  *      type    data[icAny];
120  */
121 
122 /* Some compilers accept unsigned value in enum, some don't ... */
123 /* #define icMaxTagVal 0xFFFFFFFFL */
124 
125 #define icMaxTagVal -1
126 
127 /*------------------------------------------------------------------------*/
128 /*
129  * Defines used in the specification
130  */
131 #define icMagicNumber                   0x61637370L     /* 'acsp' */
132 #define icVersionNumber                 0x02200000L     /* 2.2.0, BCD */
133 
134 /* Screening Encodings */
135 #define icPrtrDefaultScreensFalse       0x00000000L     /* Bit pos 0 */
136 #define icPrtrDefaultScreensTrue        0x00000001L     /* Bit pos 0 */
137 #define icLinesPerInch                  0x00000002L     /* Bit pos 1 */
138 #define icLinesPerCm                    0x00000000L     /* Bit pos 1 */
139 
140 /*
141  * Device attributes, currently defined values correspond
142  * to the least-significant 4 bytes of the 8 byte attribute
143  * quantity, see the header for their location.
144  */
145 #define icReflective                    0x00000000L     /* Bit pos 0 */
146 #define icTransparency                  0x00000001L     /* Bit pos 0 */
147 #define icGlossy                        0x00000000L     /* Bit pos 1 */
148 #define icMatte                         0x00000002L     /* Bit pos 1 */
149 #define icPositive                      0x00000000L     /* Bit pos 2 */
150 #define icNegative                      0x00000004L     /* Bit pos 2 */
151 #define icColor                         0x00000000L     /* Bit pos 3 */
152 #define icBlackAndWhite                 0x00000008L     /* Bit pos 3 */
153 
154 /*
155  * Profile header flags, the least-significant 16 bits are reserved
156  * for consortium use.
157  */
158 #define icEmbeddedProfileFalse          0x00000000L     /* Bit pos 0 */
159 #define icEmbeddedProfileTrue           0x00000001L     /* Bit pos 0 */
160 #define icUseAnywhere                   0x00000000L     /* Bit pos 1 */
161 #define icUseWithEmbeddedDataOnly       0x00000002L     /* Bit pos 1 */
162 
163 /* Ascii or Binary data */
164 #define icAsciiData                     0x00000000L
165 #define icBinaryData                    0x00000001L
166 
167 /* Phosphor or Colorant sets */
168 #define icPhColUnknown                  0x0000          /* Specified */
169 #define icPhColITU_R_BT_709             0x0001          /* ITU-R BT.709 */
170 #define icPhColSMPTE_RP145_1994         0x0002          /* SMPTE RP145-1994 */
171 #define icPhColEBU_Tech_3213_E          0x0003          /* EBU Tech.3213-E */
172 #define icPhColP22                      0x0004          /* P22 */
173 
174 /* Video card gamma formats (ColorSync 2.5 specific) */
175 #define icVideoCardGammaTable           0x00000000
176 #define icVideoCardGammaFormula         0x00000001
177 
178 /*
179  * Define used to indicate that this is a variable length array
180  */
181 #define icAny                           1
182 
183 /*------------------------------------------------------------------------*/
184 /*
185  * Use this area to translate platform definitions of long
186  * etc into icXXX form. The rest of the header uses the icXXX
187  * typedefs. Signatures are 4 byte quantities.
188  */
189 #ifdef ORD32			/* Formal sizes defined */
190 
191 typedef INR32           icSignature;
192 
193 /* Unsigned integer numbers */
194 typedef ORD8            icUInt8Number;
195 typedef ORD16           icUInt16Number;
196 typedef ORD32           icUInt32Number;
197 typedef ORD32           icUInt64Number[2];
198 
199 /* Signed numbers */
200 typedef INR8            icInt8Number;
201 typedef INR16           icInt16Number;
202 typedef INR32	        icInt32Number;
203 typedef INR32           icInt64Number[2];
204 
205 /* Fixed numbers */
206 typedef INR32           icS15Fixed16Number;
207 typedef ORD32           icU16Fixed16Number;
208 
209 #else /* Not formal */
210 
211 #ifdef __sgi
212 #include "sgidefs.h"
213 
214 typedef __int32_t       icSignature;
215 
216 /*
217  * Number definitions
218  */
219 
220 /* Unsigned integer numbers */
221 typedef unsigned char   icUInt8Number;
222 typedef unsigned short  icUInt16Number;
223 typedef __uint32_t      icUInt32Number;
224 typedef __uint32_t      icUInt64Number[2];
225 
226 /* Signed numbers */
227 typedef char            icInt8Number;
228 typedef short           icInt16Number;
229 typedef __int32_t       icInt32Number;
230 typedef __int32_t       icInt64Number[2];
231 
232 /* Fixed numbers */
233 typedef __int32_t       icS15Fixed16Number;
234 typedef __uint32_t      icU16Fixed16Number;
235 
236 #else   /* default definitions */
237 
238 typedef long            icSignature;
239 
240 /*
241  * Number definitions
242  */
243 
244 /* Unsigned integer numbers */
245 typedef unsigned char   icUInt8Number;
246 typedef unsigned short  icUInt16Number;
247 typedef unsigned long   icUInt32Number;
248 typedef unsigned long   icUInt64Number[2];
249 
250 /* Signed numbers */
251 typedef char            icInt8Number;
252 typedef short           icInt16Number;
253 typedef long            icInt32Number;
254 typedef long            icInt64Number[2];
255 
256 /* Fixed numbers */
257 typedef long            icS15Fixed16Number;
258 typedef unsigned long   icU16Fixed16Number;
259 #endif  /* default defs */
260 #endif  /* Not formal */
261 
262 /*------------------------------------------------------------------------*/
263 /* public tags and sizes */
264 typedef enum {
265     icSigAToB0Tag                       = 0x41324230L,  /* 'A2B0' */
266     icSigAToB1Tag                       = 0x41324231L,  /* 'A2B1' */
267     icSigAToB2Tag                       = 0x41324232L,  /* 'A2B2' */
268     icSigBlueColorantTag                = 0x6258595AL,  /* 'bXYZ' */
269     icSigBlueTRCTag                     = 0x62545243L,  /* 'bTRC' */
270     icSigBToA0Tag                       = 0x42324130L,  /* 'B2A0' */
271     icSigBToA1Tag                       = 0x42324131L,  /* 'B2A1' */
272     icSigBToA2Tag                       = 0x42324132L,  /* 'B2A2' */
273     icSigCalibrationDateTimeTag         = 0x63616C74L,  /* 'calt' */
274     icSigCharTargetTag                  = 0x74617267L,  /* 'targ' */
275     icSigChromaticityTag                = 0x6368726DL,  /* 'chrm' */
276     icSigCopyrightTag                   = 0x63707274L,  /* 'cprt' */
277     icSigCrdInfoTag                     = 0x63726469L,  /* 'crdi' */
278     icSigDeviceMfgDescTag               = 0x646D6E64L,  /* 'dmnd' */
279     icSigDeviceModelDescTag             = 0x646D6464L,  /* 'dmdd' */
280     icSigDeviceSettingsTag              = 0x64657673L,  /* 'devs' */
281     icSigGamutTag                       = 0x67616D74L,  /* 'gamt ' */
282     icSigGrayTRCTag                     = 0x6b545243L,  /* 'kTRC' */
283     icSigGreenColorantTag               = 0x6758595AL,  /* 'gXYZ' */
284     icSigGreenTRCTag                    = 0x67545243L,  /* 'gTRC' */
285     icSigLuminanceTag                   = 0x6C756d69L,  /* 'lumi' */
286     icSigMeasurementTag                 = 0x6D656173L,  /* 'meas' */
287     icSigMediaBlackPointTag             = 0x626B7074L,  /* 'bkpt' */
288     icSigMediaWhitePointTag             = 0x77747074L,  /* 'wtpt' */
289     icSigNamedColorTag                  = 0x6E636f6CL,  /* 'ncol'
290                                                          * OBSOLETE, use ncl2 */
291     icSigNamedColor2Tag                 = 0x6E636C32L,  /* 'ncl2' */
292     icSigOutputResponseTag              = 0x72657370L,  /* 'resp' */
293     icSigPreview0Tag                    = 0x70726530L,  /* 'pre0' */
294     icSigPreview1Tag                    = 0x70726531L,  /* 'pre1' */
295     icSigPreview2Tag                    = 0x70726532L,  /* 'pre2' */
296     icSigProfileDescriptionTag          = 0x64657363L,  /* 'desc' */
297     icSigProfileSequenceDescTag         = 0x70736571L,  /* 'pseq' */
298     icSigPs2CRD0Tag                     = 0x70736430L,  /* 'psd0' */
299     icSigPs2CRD1Tag                     = 0x70736431L,  /* 'psd1' */
300     icSigPs2CRD2Tag                     = 0x70736432L,  /* 'psd2' */
301     icSigPs2CRD3Tag                     = 0x70736433L,  /* 'psd3' */
302     icSigPs2CSATag                      = 0x70733273L,  /* 'ps2s' */
303     icSigPs2RenderingIntentTag          = 0x70733269L,  /* 'ps2i' */
304     icSigRedColorantTag                 = 0x7258595AL,  /* 'rXYZ' */
305     icSigRedTRCTag                      = 0x72545243L,  /* 'rTRC' */
306     icSigScreeningDescTag               = 0x73637264L,  /* 'scrd' */
307     icSigScreeningTag                   = 0x7363726EL,  /* 'scrn' */
308     icSigTechnologyTag                  = 0x74656368L,  /* 'tech' */
309     icSigUcrBgTag                       = 0x62666420L,  /* 'bfd ' */
310         icSigVideoCardGammaTag              = 0x76636774L,  /* 'vcgt' ColorSync 2.5 */
311     icSigViewingCondDescTag             = 0x76756564L,  /* 'vued' */
312     icSigViewingConditionsTag           = 0x76696577L,  /* 'view' */
313     icMaxEnumTag                        = icMaxTagVal
314 } icTagSignature;
315 
316 /* technology signature descriptions */
317 typedef enum {
318     icSigDigitalCamera                  = 0x6463616DL,  /* 'dcam' */
319     icSigFilmScanner                    = 0x6673636EL,  /* 'fscn' */
320     icSigReflectiveScanner              = 0x7273636EL,  /* 'rscn' */
321     icSigInkJetPrinter                  = 0x696A6574L,  /* 'ijet' */
322     icSigThermalWaxPrinter              = 0x74776178L,  /* 'twax' */
323     icSigElectrophotographicPrinter     = 0x6570686FL,  /* 'epho' */
324     icSigElectrostaticPrinter           = 0x65737461L,  /* 'esta' */
325     icSigDyeSublimationPrinter          = 0x64737562L,  /* 'dsub' */
326     icSigPhotographicPaperPrinter       = 0x7270686FL,  /* 'rpho' */
327     icSigFilmWriter                     = 0x6670726EL,  /* 'fprn' */
328     icSigVideoMonitor                   = 0x7669646DL,  /* 'vidm' */
329     icSigVideoCamera                    = 0x76696463L,  /* 'vidc' */
330     icSigProjectionTelevision           = 0x706A7476L,  /* 'pjtv' */
331     icSigCRTDisplay                     = 0x43525420L,  /* 'CRT ' */
332     icSigPMDisplay                      = 0x504D4420L,  /* 'PMD ' */
333     icSigAMDisplay                      = 0x414D4420L,  /* 'AMD ' */
334     icSigPhotoCD                        = 0x4B504344L,  /* 'KPCD' */
335     icSigPhotoImageSetter               = 0x696D6773L,  /* 'imgs' */
336     icSigGravure                        = 0x67726176L,  /* 'grav' */
337     icSigOffsetLithography              = 0x6F666673L,  /* 'offs' */
338     icSigSilkscreen                     = 0x73696C6BL,  /* 'silk' */
339     icSigFlexography                    = 0x666C6578L,  /* 'flex' */
340     icMaxEnumTechnology                 = icMaxTagVal
341 } icTechnologySignature;
342 
343 /* type signatures */
344 typedef enum {
345     icSigCurveType                      = 0x63757276L,  /* 'curv' */
346     icSigChromaticityType               = 0x6368726DL,  /* 'chrm' */
347     icSigDataType                       = 0x64617461L,  /* 'data' */
348     icSigDateTimeType                   = 0x6474696DL,  /* 'dtim' */
349     icSigDeviceSettingsType             = 0x64657673L,  /* 'devs' */
350     icSigLut16Type                      = 0x6d667432L,  /* 'mft2' */
351     icSigLut8Type                       = 0x6d667431L,  /* 'mft1' */
352     icSigMeasurementType                = 0x6D656173L,  /* 'meas' */
353     icSigNamedColorType                 = 0x6E636f6CL,  /* 'ncol'
354                                                          * OBSOLETE, use ncl2 */
355     icSigProfileSequenceDescType        = 0x70736571L,  /* 'pseq' */
356     icSigResponseCurveSet16Type         = 0x72637332L,  /* 'rcs2' */
357     icSigS15Fixed16ArrayType            = 0x73663332L,  /* 'sf32' */
358     icSigScreeningType                  = 0x7363726EL,  /* 'scrn' */
359     icSigSignatureType                  = 0x73696720L,  /* 'sig ' */
360     icSigTextType                       = 0x74657874L,  /* 'text' */
361     icSigTextDescriptionType            = 0x64657363L,  /* 'desc' */
362     icSigU16Fixed16ArrayType            = 0x75663332L,  /* 'uf32' */
363     icSigUcrBgType                      = 0x62666420L,  /* 'bfd ' */
364     icSigUInt16ArrayType                = 0x75693136L,  /* 'ui16' */
365     icSigUInt32ArrayType                = 0x75693332L,  /* 'ui32' */
366     icSigUInt64ArrayType                = 0x75693634L,  /* 'ui64' */
367     icSigUInt8ArrayType                 = 0x75693038L,  /* 'ui08' */
368         icSigVideoCardGammaType             = 0x76636774L,  /* 'vcgt' ColorSync 2.5 */
369     icSigViewingConditionsType          = 0x76696577L,  /* 'view' */
370     icSigXYZType                        = 0x58595A20L,  /* 'XYZ ' */
371     icSigXYZArrayType                   = 0x58595A20L,  /* 'XYZ ' */
372     icSigNamedColor2Type                = 0x6E636C32L,  /* 'ncl2' */
373     icSigCrdInfoType                    = 0x63726469L,  /* 'crdi' */
374     icMaxEnumType                       = icMaxTagVal
375 } icTagTypeSignature;
376 
377 /*
378  * Color Space Signatures
379  * Note that only icSigXYZData and icSigLabData are valid
380  * Profile Connection Spaces (PCSs)
381  */
382 typedef enum {
383     icSigXYZData                        = 0x58595A20L,  /* 'XYZ ' */
384     icSigLabData                        = 0x4C616220L,  /* 'Lab ' */
385     icSigLuvData                        = 0x4C757620L,  /* 'Luv ' */
386     icSigYCbCrData                      = 0x59436272L,  /* 'YCbr' */
387     icSigYxyData                        = 0x59787920L,  /* 'Yxy ' */
388     icSigRgbData                        = 0x52474220L,  /* 'RGB ' */
389     icSigGrayData                       = 0x47524159L,  /* 'GRAY' */
390     icSigHsvData                        = 0x48535620L,  /* 'HSV ' */
391     icSigHlsData                        = 0x484C5320L,  /* 'HLS ' */
392     icSigCmykData                       = 0x434D594BL,  /* 'CMYK' */
393     icSigCmyData                        = 0x434D5920L,  /* 'CMY ' */
394     icSigMch5Data                       = 0x4D434835L,  /* 'MCH5' Colorsync ? */
395     icSigMch6Data                       = 0x4D434836L,  /* 'MCH6' Hexachrome: CMYKOG */
396     icSigMch7Data                       = 0x4D434837L,  /* 'MCH7' Colorsync ? */
397     icSigMch8Data                       = 0x4D434838L,  /* 'MCH8' Colorsync ? */
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                       = icMaxTagVal
413 } icColorSpaceSignature;
414 
415 /* profileClass enumerations */
416 typedef enum {
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                      = icMaxTagVal
425 } icProfileClassSignature;
426 
427 /* Platform Signatures */
428 typedef enum {
429     icSigMacintosh                      = 0x4150504CL,  /* 'APPL' */
430     icSigMicrosoft                      = 0x4D534654L,  /* 'MSFT' */
431     icSigSolaris                        = 0x53554E57L,  /* 'SUNW' */
432     icSigSGI                            = 0x53474920L,  /* 'SGI ' */
433     icSigTaligent                       = 0x54474E54L,  /* 'TGNT' */
434     icMaxEnumPlatform                   = icMaxTagVal
435 } icPlatformSignature;
436 
437 /*------------------------------------------------------------------------*/
438 /*
439  * Other enums
440  */
441 
442 /* Measurement Flare, used in the measurmentType tag */
443 typedef enum {
444     icFlare0                            = 0x00000000L,  /* 0% flare */
445     icFlare100                          = 0x00000001L,  /* 100% flare */
446     icMaxFlare                          = icMaxTagVal
447 } icMeasurementFlare;
448 
449 /* Measurement Geometry, used in the measurmentType tag */
450 typedef enum {
451     icGeometryUnknown                   = 0x00000000L,  /* Unknown */
452     icGeometry045or450                  = 0x00000001L,  /* 0/45, 45/0 */
453     icGeometry0dord0                    = 0x00000002L,  /* 0/d or d/0 */
454     icMaxGeometry                       = icMaxTagVal
455 } icMeasurementGeometry;
456 
457 /* Rendering Intents, used in the profile header */
458 typedef enum {
459     icPerceptual                        = 0,
460     icRelativeColorimetric              = 1,
461     icSaturation                        = 2,
462     icAbsoluteColorimetric              = 3,
463     icMaxEnumIntent                     = icMaxTagVal
464 } icRenderingIntent;
465 
466 /* Different Spot Shapes currently defined, used for screeningType */
467 typedef enum {
468     icSpotShapeUnknown                  = 0,
469     icSpotShapePrinterDefault           = 1,
470     icSpotShapeRound                    = 2,
471     icSpotShapeDiamond                  = 3,
472     icSpotShapeEllipse                  = 4,
473     icSpotShapeLine                     = 5,
474     icSpotShapeSquare                   = 6,
475     icSpotShapeCross                    = 7,
476     icMaxEnumSpot                       = icMaxTagVal
477 } icSpotShape;
478 
479 /* Standard Observer, used in the measurmentType tag */
480 typedef enum {
481     icStdObsUnknown                     = 0x00000000L,  /* Unknown */
482     icStdObs1931TwoDegrees              = 0x00000001L,  /* 2 deg */
483     icStdObs1964TenDegrees              = 0x00000002L,  /* 10 deg */
484     icMaxStdObs                         = icMaxTagVal
485 } icStandardObserver;
486 
487 /* Pre-defined illuminants, used in measurement and viewing conditions type */
488 typedef enum {
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                  = icMaxTagVal
499 } icIlluminant;
500 
501 /* media type for icSigDeviceSettingsTag */
502 typedef enum {
503     icStandard                          = 1,
504     icTrans                             = 2, /* transparency */
505     icGloss                             = 3,
506     icUser1                             = 256,
507     icMaxDeviceMedia                    = icMaxTagVal
508 } icDeviceMedia;
509 
510 /* halftone settings for icSigDeviceSettingTag */
511 typedef enum {
512     icNone                              = 1,
513     icCoarse                            = 2,
514     icFine                              = 3,
515     icLineArt                           = 4,
516     icErrorDiffusion                    = 5,
517     icReserved6                         = 6,
518     icReserved7                         = 7,
519     icReserved8                         = 8,
520     icReserved9                         = 9,
521     icGrayScale                         = 10,
522     icUser2                             = 256,
523     icMaxDither                         = icMaxTagVal
524 } icDeviceDither;
525 
526 /* signatures for icSigDeviceSettingsTag */
527 typedef enum {
528     icSigResolution                     = 0x72736c6eL, /* 'rsln' */
529     icSigMedia                          = 0x6d747970L, /* 'mtyp' */
530     icSigHalftone                       = 0x6866746eL, /* 'hftn' */
531     icMaxSettings                       = icMaxTagVal
532 } icSettingsSig;
533 
534 /* measurement units for the icResponseCurveSet16Type */
535 typedef enum {
536     icStaA                              = 0x53746141L, /* 'StaA' */
537     icStaE                              = 0x53746145L, /* 'StaE' */
538     icStaI                              = 0x53746149L, /* 'StaI' */
539     icStaT                              = 0x53746154L, /* 'StaT' */
540     icStaM                              = 0x5374614dL, /* 'StaM' */
541     icDN                                = 0x444e2020L, /* 'DN ' */
542     icDNP                               = 0x444e2050L, /* 'DN P' */
543     icDNN                               = 0x444e4e20L, /* 'DNN ' */
544     icDNNP                              = 0x444e4e50L, /* 'DNNP' */
545     icMaxUnits                          = icMaxTagVal
546 } icMeasUnitsSig;
547 
548 /*------------------------------------------------------------------------*/
549 /*
550  * Arrays of numbers
551  */
552 
553 /* Int8 Array */
554 typedef struct {
555     icInt8Number        data[icAny];    /* Variable array of values */
556 } icInt8Array;
557 
558 /* UInt8 Array */
559 typedef struct {
560     icUInt8Number       data[icAny];    /* Variable array of values */
561 } icUInt8Array;
562 
563 /* uInt16 Array */
564 typedef struct {
565     icUInt16Number      data[icAny];    /* Variable array of values */
566 } icUInt16Array;
567 
568 /* Int16 Array */
569 typedef struct {
570     icInt16Number       data[icAny];    /* Variable array of values */
571 } icInt16Array;
572 
573 /* uInt32 Array */
574 typedef struct {
575     icUInt32Number      data[icAny];    /* Variable array of values */
576 } icUInt32Array;
577 
578 /* Int32 Array */
579 typedef struct {
580     icInt32Number       data[icAny];    /* Variable array of values */
581 } icInt32Array;
582 
583 /* UInt64 Array */
584 typedef struct {
585     icUInt64Number      data[icAny];    /* Variable array of values */
586 } icUInt64Array;
587 
588 /* Int64 Array */
589 typedef struct {
590     icInt64Number       data[icAny];    /* Variable array of values */
591 } icInt64Array;
592 
593 /* u16Fixed16 Array */
594 typedef struct {
595     icU16Fixed16Number  data[icAny];    /* Variable array of values */
596 } icU16Fixed16Array;
597 
598 /* s15Fixed16 Array */
599 typedef struct {
600     icS15Fixed16Number  data[icAny];    /* Variable array of values */
601 } icS15Fixed16Array;
602 
603 /* The base date time number */
604 typedef struct {
605     icUInt16Number      year;
606     icUInt16Number      month;
607     icUInt16Number      day;
608     icUInt16Number      hours;
609     icUInt16Number      minutes;
610     icUInt16Number      seconds;
611 } icDateTimeNumber;
612 
613 /* XYZ Number  */
614 typedef struct {
615     icS15Fixed16Number  X;
616     icS15Fixed16Number  Y;
617     icS15Fixed16Number  Z;
618 } icXYZNumber;
619 
620 /* XYZ Array */
621 typedef struct {
622     icXYZNumber         data[icAny];    /* Variable array of XYZ numbers */
623 } icXYZArray;
624 
625 /* Curve */
626 typedef struct {
627     icUInt32Number      count;          /* Number of entries */
628     icUInt16Number      data[icAny];    /* The actual table data, real
629                                          * number is determined by count
630                                          * Interpretation depends on how
631                                          * data is used with a given tag
632                                          */
633 } icCurve;
634 
635 /* Data */
636 typedef struct {
637     icUInt32Number      dataFlag;       /* 0 = ascii, 1 = binary */
638     icInt8Number        data[icAny];    /* Data, size from tag */
639 } icData;
640 
641 /* lut16 */
642 typedef struct {
643     icUInt8Number       inputChan;      /* Number of input channels */
644     icUInt8Number       outputChan;     /* Number of output channels */
645     icUInt8Number       clutPoints;     /* Number of grid points */
646     icInt8Number        pad;            /* Padding for byte alignment */
647     icS15Fixed16Number  e00;            /* e00 in the 3 * 3 */
648     icS15Fixed16Number  e01;            /* e01 in the 3 * 3 */
649     icS15Fixed16Number  e02;            /* e02 in the 3 * 3 */
650     icS15Fixed16Number  e10;            /* e10 in the 3 * 3 */
651     icS15Fixed16Number  e11;            /* e11 in the 3 * 3 */
652     icS15Fixed16Number  e12;            /* e12 in the 3 * 3 */
653     icS15Fixed16Number  e20;            /* e20 in the 3 * 3 */
654     icS15Fixed16Number  e21;            /* e21 in the 3 * 3 */
655     icS15Fixed16Number  e22;            /* e22 in the 3 * 3 */
656     icUInt16Number      inputEnt;       /* Num of in-table entries */
657     icUInt16Number      outputEnt;      /* Num of out-table entries */
658     icUInt16Number      data[icAny];    /* Data follows see spec */
659 /*
660  *  Data that follows is of this form
661  *
662  *  icUInt16Number      inputTable[inputChan][icAny];   * The in-table
663  *  icUInt16Number      clutTable[icAny];               * The clut
664  *  icUInt16Number      outputTable[outputChan][icAny]; * The out-table
665  */
666 } icLut16;
667 
668 /* lut8, input & output tables are always 256 bytes in length */
669 typedef struct {
670     icUInt8Number       inputChan;      /* Num of input channels */
671     icUInt8Number       outputChan;     /* Num of output channels */
672     icUInt8Number       clutPoints;     /* Num of grid points */
673     icInt8Number        pad;
674     icS15Fixed16Number  e00;            /* e00 in the 3 * 3 */
675     icS15Fixed16Number  e01;            /* e01 in the 3 * 3 */
676     icS15Fixed16Number  e02;            /* e02 in the 3 * 3 */
677     icS15Fixed16Number  e10;            /* e10 in the 3 * 3 */
678     icS15Fixed16Number  e11;            /* e11 in the 3 * 3 */
679     icS15Fixed16Number  e12;            /* e12 in the 3 * 3 */
680     icS15Fixed16Number  e20;            /* e20 in the 3 * 3 */
681     icS15Fixed16Number  e21;            /* e21 in the 3 * 3 */
682     icS15Fixed16Number  e22;            /* e22 in the 3 * 3 */
683     icUInt8Number       data[icAny];    /* Data follows see spec */
684 /*
685  *  Data that follows is of this form
686  *
687  *  icUInt8Number       inputTable[inputChan][256];     * The in-table
688  *  icUInt8Number       clutTable[icAny];               * The clut
689  *  icUInt8Number       outputTable[outputChan][256];   * The out-table
690  */
691 } icLut8;
692 
693 /* Measurement Data */
694 typedef struct {
695     icStandardObserver          stdObserver;    /* Standard observer */
696     icXYZNumber                 backing;        /* XYZ for backing */
697     icMeasurementGeometry       geometry;       /* Meas. geometry */
698     icMeasurementFlare          flare;          /* Measurement flare */
699     icIlluminant                illuminant;     /* Illuminant */
700 } icMeasurement;
701 
702 /* Named color */
703 
704 /*
705  * icNamedColor2 takes the place of icNamedColor
706  */
707 typedef struct {
708     icUInt32Number      vendorFlag;     /* Bottom 16 bits for IC use */
709     icUInt32Number      count;          /* Count of named colors */
710     icUInt32Number      nDeviceCoords;  /* Num of device coordinates */
711     icInt8Number        prefix[32];     /* Prefix for each color name */
712     icInt8Number        suffix[32];     /* Suffix for each color name */
713     icInt8Number        data[icAny];    /* Named color data follows */
714 /*
715  *  Data that follows is of this form
716  *
717  * icInt8Number         root1[32];              * Root name for 1st color
718  * icUInt16Number       pcsCoords1[icAny];      * PCS coords of 1st color
719  * icUInt16Number       deviceCoords1[icAny];   * Dev coords of 1st color
720  * icInt8Number         root2[32];              * Root name for 2nd color
721  * icUInt16Number       pcsCoords2[icAny];      * PCS coords of 2nd color
722  * icUInt16Number       deviceCoords2[icAny];   * Dev coords of 2nd color
723  *                      :
724  *                      :
725  * Repeat for name and PCS and device color coordinates up to (count-1)
726  *
727  * NOTES:
728  * PCS and device space can be determined from the header.
729  *
730  * PCS coordinates are icUInt16 numbers and are described in Annex A of
731  * the ICC spec. Only 16 bit L*a*b* and XYZ are allowed. The number of
732  * coordinates is consistent with the headers PCS.
733  *
734  * Device coordinates are icUInt16 numbers where 0x0000 represents
735  * the minimum value and 0xFFFF represents the maximum value.
736  * If the nDeviceCoords value is 0 this field is not given.
737  */
738 } icNamedColor2;
739 
740 /* Profile sequence structure */
741 typedef struct {
742     icSignature                 deviceMfg;      /* Dev Manufacturer */
743     icSignature                 deviceModel;    /* Dev Model */
744     icUInt64Number              attributes;     /* Dev attributes */
745     icTechnologySignature       technology;     /* Technology sig */
746     icInt8Number                data[icAny];    /* Desc text follows */
747 /*
748  *  Data that follows is of this form, this is an icInt8Number
749  *  to avoid problems with a compiler generating  bad code as
750  *  these arrays are variable in length.
751  *
752  * icTextDescription            deviceMfgDesc;  * Manufacturer text
753  * icTextDescription            modelDesc;      * Model text
754  */
755 } icDescStruct;
756 
757 /* Profile sequence description */
758 typedef struct {
759     icUInt32Number      count;          /* Number of descriptions */
760     icUInt8Number       data[icAny];    /* Array of desc structs */
761 } icProfileSequenceDesc;
762 
763 /* textDescription */
764 typedef struct {
765     icUInt32Number      count;          /* Description length */
766     icInt8Number        data[icAny];    /* Descriptions follow */
767 /*
768  *  Data that follows is of this form
769  *
770  * icInt8Number         desc[count]     * NULL terminated ascii string
771  * icUInt32Number       ucLangCode;     * UniCode language code
772  * icUInt32Number       ucCount;        * UniCode description length
773  * icInt16Number        ucDesc[ucCount];* The UniCode description
774  * icUInt16Number       scCode;         * ScriptCode code
775  * icUInt8Number        scCount;        * ScriptCode count
776  * icInt8Number         scDesc[67];     * ScriptCode Description
777  */
778 } icTextDescription;
779 
780 /* Screening Data */
781 typedef struct {
782     icS15Fixed16Number  frequency;      /* Frequency */
783     icS15Fixed16Number  angle;          /* Screen angle */
784     icSpotShape         spotShape;      /* Spot Shape encodings below */
785 } icScreeningData;
786 
787 typedef struct {
788     icUInt32Number      screeningFlag;  /* Screening flag */
789     icUInt32Number      channels;       /* Number of channels */
790     icScreeningData     data[icAny];    /* Array of screening data */
791 } icScreening;
792 
793 /* Text Data */
794 typedef struct {
795     icInt8Number        data[icAny];    /* Variable array of chars */
796 } icText;
797 
798 /* Structure describing either a UCR or BG curve */
799 typedef struct {
800     icUInt32Number      count;          /* Curve length */
801     icUInt16Number      curve[icAny];   /* The array of curve values */
802 } icUcrBgCurve;
803 
804 /* Under color removal, black generation */
805 typedef struct {
806     icInt8Number        data[icAny];            /* The Ucr BG data */
807 /*
808  *  Data that follows is of this form, this is a icInt8Number
809  *  to avoid problems with a compiler generating  bad code as
810  *  these arrays are variable in length.
811  *
812  * icUcrBgCurve         ucr;            * Ucr curve
813  * icUcrBgCurve         bg;             * Bg curve
814  * icInt8Number         string;         * UcrBg description
815  */
816 } icUcrBg;
817 
818 /* viewingConditionsType */
819 typedef struct {
820     icXYZNumber         illuminant;     /* In candelas per sq. meter */
821     icXYZNumber         surround;       /* In candelas per sq. meter */
822     icIlluminant        stdIluminant;   /* See icIlluminant defines */
823 } icViewingCondition;
824 
825 /* CrdInfo type */
826 typedef struct {
827     icUInt32Number      count;          /* Char count includes NULL */
828     icInt8Number        desc[icAny];    /* Null terminated string */
829 } icCrdInfo;
830 
831 /* support structures for the icSigDeviceSettingsTag */
832 typedef struct {
833     icUInt32Number      numPlatforms; /* number of platforms */
834     icUInt32Number      data[icAny];
835 }icSettingsData;
836 
837 /* where data is "numPlatforms" of the following structure
838  *
839  *typedef struct {
840  *  icPlatformSignature platform;
841  *  icUInt32Number      size;         total size of all settings
842  *  icUInt32Number      combCount;    # of settings
843  *  icSettingsStruct    data[icAny];
844  *};
845  *
846  * where data is "combCount" of the following structure
847  *
848  *typedef struct {
849  *  icUInt32Number      structSize;   size in bytes of entire structure
850  *  icUInt32Number      numStructs;   # of setting structures inlcuded
851  *  icSettings          data[icAny];
852  *}icSettingsStruct;
853  *
854  * where data is "numStructs" of the following structure
855  *
856  *typedef struct {
857  *  icSettingsSig       settingSig;
858  *  icUInt32Number      size;         size in bytes per setting value
859  *  icUInt32Number      numSettings;  number of seting values
860  *  icUInt32Number      data[icAny];
861  *}icSettings;
862  *
863  * where data is "numsettings" of one of the following:
864  *  icUInt64Number      resolution;
865  *  icDeviceMedia       media;
866  *  icDeviceDither      halftone;
867 */
868 
869 /* for use with the icResponseCurveSet16Type */
870 typedef struct {
871     icUInt16Number channels;            /* number of channels */
872     icUInt16Number numTypes;            /* count of meas. types */
873     icUInt32Number data[icAny];
874 }icResponse;
875 
876 /* where data is "numTypes" of the following
877  *  icMeasUnitsSig      sigType;
878  *  icUInt32Number      numMeas;   one entry for each "channels"
879  *  icXYZNumber         meas;      one xyz entry for each "channels"
880  *                                     respective "numMeas"
881  *  icResponse16Number  respNum;   one structure for each "channels"
882  *                                     respective "numMeas"
883 */
884 
885 typedef struct {
886     icUInt16Number      interval;       /* device value scaled 0-FFFF */
887     icUInt16Number      pad;            /* 0 */
888     icS15Fixed16Number  measurement;    /* actual measurement value */
889 } icResponse16Number;
890 
891 /*------------------------------------------------------------------------*/
892 /*
893  * Tag Type definitions
894  */
895 
896 /*
897  * Many of the structures contain variable length arrays. This
898  * is represented by the use of the convention.
899  *
900  *      type    data[icAny];
901  */
902 
903 /* The base part of each tag */
904 typedef struct {
905     icTagTypeSignature  sig;            /* Signature */
906     icInt8Number        reserved[4];    /* Reserved, set to 0 */
907 } icTagBase;
908 
909 /* curveType */
910 typedef struct {
911     icTagBase           base;           /* Signature, "curv" */
912     icCurve             curve;          /* The curve data */
913 } icCurveType;
914 
915 /* dataType */
916 typedef struct {
917     icTagBase           base;           /* Signature, "data" */
918     icData              data;           /* The data structure */
919 } icDataType;
920 
921 /* dateTimeType */
922 typedef struct {
923     icTagBase           base;           /* Signature, "dtim" */
924     icDateTimeNumber    date;           /* The date */
925 } icDateTimeType;
926 
927 /* lut16Type */
928 typedef struct {
929     icTagBase           base;           /* Signature, "mft2" */
930     icLut16             lut;            /* Lut16 data */
931 } icLut16Type;
932 
933 /* lut8Type, input & output tables are always 256 bytes in length */
934 typedef struct {
935     icTagBase           base;           /* Signature, "mft1" */
936     icLut8              lut;            /* Lut8 data */
937 } icLut8Type;
938 
939 /* Measurement Type */
940 typedef struct {
941     icTagBase           base;           /* Signature, "meas" */
942     icMeasurement       measurement;    /* Measurement data */
943 } icMeasurementType;
944 
945 /* Named color type */
946 /* icNamedColor2Type, replaces icNamedColorType */
947 typedef struct {
948     icTagBase           base;           /* Signature, "ncl2" */
949     icNamedColor2       ncolor;         /* Named color data */
950 } icNamedColor2Type;
951 
952 /* Profile sequence description type */
953 typedef struct {
954     icTagBase                   base;   /* Signature, "pseq" */
955     icProfileSequenceDesc       desc;   /* The seq description */
956 } icProfileSequenceDescType;
957 
958 /* textDescriptionType */
959 typedef struct {
960     icTagBase                   base;   /* Signature, "desc" */
961     icTextDescription           desc;   /* The description */
962 } icTextDescriptionType;
963 
964 /* s15Fixed16Type */
965 typedef struct {
966     icTagBase           base;           /* Signature, "sf32" */
967     icS15Fixed16Array   data;           /* Array of values */
968 } icS15Fixed16ArrayType;
969 
970 typedef struct {
971     icTagBase           base;           /* Signature, "scrn" */
972     icScreening         screen;         /* Screening structure */
973 } icScreeningType;
974 
975 /* sigType */
976 typedef struct {
977     icTagBase           base;           /* Signature, "sig" */
978     icSignature         signature;      /* The signature data */
979 } icSignatureType;
980 
981 /* textType */
982 typedef struct {
983     icTagBase           base;           /* Signature, "text" */
984     icText              data;           /* Variable array of chars */
985 } icTextType;
986 
987 /* u16Fixed16Type */
988 typedef struct {
989     icTagBase           base;           /* Signature, "uf32" */
990     icU16Fixed16Array   data;           /* Variable array of values */
991 } icU16Fixed16ArrayType;
992 
993 /* Under color removal, black generation type */
994 typedef struct {
995     icTagBase           base;           /* Signature, "bfd " */
996     icUcrBg             data;           /* ucrBg structure */
997 } icUcrBgType;
998 
999 /* uInt16Type */
1000 typedef struct {
1001     icTagBase           base;           /* Signature, "ui16" */
1002     icUInt16Array       data;           /* Variable array of values */
1003 } icUInt16ArrayType;
1004 
1005 /* uInt32Type */
1006 typedef struct {
1007     icTagBase           base;           /* Signature, "ui32" */
1008     icUInt32Array       data;           /* Variable array of values */
1009 } icUInt32ArrayType;
1010 
1011 /* uInt64Type */
1012 typedef struct {
1013     icTagBase           base;           /* Signature, "ui64" */
1014     icUInt64Array       data;           /* Variable array of values */
1015 } icUInt64ArrayType;
1016 
1017 /* uInt8Type */
1018 typedef struct {
1019     icTagBase           base;           /* Signature, "ui08" */
1020     icUInt8Array        data;           /* Variable array of values */
1021 } icUInt8ArrayType;
1022 
1023 /* viewingConditionsType */
1024 typedef struct {
1025     icTagBase           base;           /* Signature, "view" */
1026     icViewingCondition  view;           /* Viewing conditions */
1027 } icViewingConditionType;
1028 
1029 /* XYZ Type */
1030 typedef struct {
1031     icTagBase           base;           /* Signature, "XYZ" */
1032     icXYZArray          data;           /* Variable array of XYZ nums */
1033 } icXYZType;
1034 
1035 /* CRDInfoType where [0] is the CRD product name count and string and
1036  * [1] -[5] are the rendering intents 0-4 counts and strings
1037  */
1038 typedef struct {
1039     icTagBase           base;           /* Signature, "crdi" */
1040     icCrdInfo           info;           /* 5 sets of counts & strings */
1041 }icCrdInfoType;
1042      /*   icCrdInfo       productName;     PS product count/string */
1043      /*   icCrdInfo       CRDName0;        CRD name for intent 0 */
1044      /*   icCrdInfo       CRDName1;        CRD name for intent 1 */
1045      /*   icCrdInfo       CRDName2;        CRD name for intent 2 */
1046      /*   icCrdInfo       CRDName3;        CRD name for intent 3 */
1047 
1048 typedef struct {
1049     icTagBase           base;           /* Signature, 'devs' */
1050     icSettingsData      data;
1051 }icDeviceSettingsType;
1052 
1053 typedef struct {
1054     icTagBase           base;           /* Signature, 'rcs2' */
1055     icResponse data;
1056 }icResponseCurveSet16Type;
1057 
1058 /* where data is structured as follows
1059  * icUInt16Number  channels;          number of channels
1060  * icUInt16Number  numTypes;          count of measurement types
1061  * icUInt32Number  offset[numTypes];  offset from byte 0 of tag to each
1062  *                                       response data set
1063  *
1064  * plus one or more of the following structures
1065  * typedef struct {
1066  *    icMeasUnitsSig      measurementUnit;        sig of the meas. unit
1067  *    icUInt32Number      perChannel[channels];   # of meas's per chan
1068  *    icXYZNumber         measure[channels];      measurements of patch
1069  *                                                  w/max colorant value
1070  *    icResponse16Number  response[channels][perChannel[channels]];
1071  *    }
1072  */
1073 
1074 /*------------------------------------------------------------------------*/
1075 
1076 /*
1077  * Lists of tags, tags, profile header and profile structure
1078  */
1079 
1080 /* A tag */
1081 typedef struct {
1082     icTagSignature      sig;            /* The tag signature */
1083     icUInt32Number      offset;         /* Start of tag relative to
1084                                          * start of header, Spec
1085                                          * Clause 5 */
1086     icUInt32Number      size;           /* Size in bytes */
1087 } icTag;
1088 
1089 /* A Structure that may be used independently for a list of tags */
1090 typedef struct {
1091     icUInt32Number      count;          /* Num tags in the profile */
1092     icTag               tags[icAny];    /* Variable array of tags */
1093 } icTagList;
1094 
1095 /* The Profile header */
1096 typedef struct {
1097     icUInt32Number              size;           /* Prof size in bytes */
1098     icSignature                 cmmId;          /* CMM for profile */
1099     icUInt32Number              version;        /* Format version */
1100     icProfileClassSignature     deviceClass;    /* Type of profile */
1101     icColorSpaceSignature       colorSpace;     /* Clr space of data */
1102     icColorSpaceSignature       pcs;            /* PCS, XYZ or Lab */
1103     icDateTimeNumber            date;           /* Creation Date */
1104     icSignature                 magic;          /* icMagicNumber */
1105     icPlatformSignature         platform;       /* Primary Platform */
1106     icUInt32Number              flags;          /* Various bits */
1107     icSignature                 manufacturer;   /* Dev manufacturer */
1108     icUInt32Number              model;          /* Dev model number */
1109     icUInt64Number              attributes;     /* Device attributes */
1110     icUInt32Number              renderingIntent;/* Rendering intent */
1111     icXYZNumber                 illuminant;     /* Profile illuminant */
1112     icSignature                 creator;        /* Profile creator */
1113     icInt8Number                reserved[44];   /* Reserved */
1114 } icHeader;
1115 
1116 /*
1117  * A profile,
1118  * we can't use icTagList here because its not at the end of the structure
1119  */
1120 typedef struct {
1121     icHeader            header;         /* The header */
1122     icUInt32Number      count;          /* Num tags in the profile */
1123     icInt8Number        data[icAny];    /* The tagTable and tagData */
1124 /*
1125  * Data that follows is of the form
1126  *
1127  * icTag        tagTable[icAny];        * The tag table
1128  * icInt8Number tagData[icAny];         * The tag data
1129  */
1130 } icProfile;
1131 
1132 /*------------------------------------------------------------------------*/
1133 /* Obsolete entries */
1134 
1135 /* icNamedColor was replaced with icNamedColor2 */
1136 typedef struct {
1137     icUInt32Number      vendorFlag;     /* Bottom 16 bits for IC use */
1138     icUInt32Number      count;          /* Count of named colors */
1139     icInt8Number        data[icAny];    /* Named color data follows */
1140 /*
1141  *  Data that follows is of this form
1142  *
1143  * icInt8Number         prefix[icAny];  * Prefix
1144  * icInt8Number         suffix[icAny];  * Suffix
1145  * icInt8Number         root1[icAny];   * Root name
1146  * icInt8Number         coords1[icAny]; * Color coordinates
1147  * icInt8Number         root2[icAny];   * Root name
1148  * icInt8Number         coords2[icAny]; * Color coordinates
1149  *                      :
1150  *                      :
1151  * Repeat for root name and color coordinates up to (count-1)
1152  */
1153 } icNamedColor;
1154 
1155 /* icNamedColorType was replaced by icNamedColor2Type */
1156 typedef struct {
1157     icTagBase           base;           /* Signature, "ncol" */
1158     icNamedColor        ncolor;         /* Named color data */
1159 } icNamedColorType;
1160 
1161 #endif /* ICC9809_H */
1162