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