Subversion Repositories Scribus

Rev

Rev 6 | Details | Compare with Previous | Last modification | View Log | RSS feed

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