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