Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

icc.h

Go to the documentation of this file.
00001 /* Header file guard bands */ 00002 #ifndef ICC_H 00003 #define ICC_H 00004 00005 /***************************************************************** 00006 Copyright (c) 1994 SunSoft, Inc. 00007 00008 All Rights Reserved 00009 00010 Permission is hereby granted, free of charge, to any person 00011 obtaining a copy of this software and associated documentation 00012 files (the "Software"), to deal in the Software without restrict- 00013 ion, including without limitation the rights to use, copy, modify, 00014 merge, publish distribute, sublicense, and/or sell copies of the 00015 Software, and to permit persons to whom the Software is furnished 00016 to do so, subject to the following conditions: 00017 00018 The above copyright notice and this permission notice shall be 00019 included in all copies or substantial portions of the Software. 00020 00021 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00022 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 00023 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON- 00024 INFRINGEMENT. IN NO EVENT SHALL SUNSOFT, INC. OR ITS PARENT 00025 COMPANY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 00026 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00027 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00028 OTHER DEALINGS IN THE SOFTWARE. 00029 00030 Except as contained in this notice, the name of SunSoft, Inc. 00031 shall not be used in advertising or otherwise to promote the 00032 sale, use or other dealings in this Software without written 00033 authorization from SunSoft Inc. 00034 ******************************************************************/ 00035 00036 /* 00037 * This version of the header file corresponds to the profile 00038 * specification version 3.0. 00039 * 00040 * All header file entries are pre-fixed with "ic" to help 00041 * avoid name space collisions. Signatures are pre-fixed with 00042 * icSig. 00043 * 00044 * The structures defined in this header file were created to 00045 * represent a description of an ICC profile on disk. Rather 00046 * than use pointers a technique is used where a single byte array 00047 * was placed at the end of each structure. This allows us in "C" 00048 * to extend the structure by allocating more data than is needed 00049 * to account for variable length structures. 00050 * 00051 * This also ensures that data following is allocated 00052 * contiguously and makes it easier to write and read data from 00053 * the file. 00054 * 00055 * For example to allocate space for a 256 count length UCR 00056 * and BG array, and fill the allocated data. 00057 * 00058 icUcrBgCurve *ucrCurve, *bgCurve; 00059 int ucr_nbytes, bg_nbytes; 00060 icUcrBg *ucrBgWrite; 00061 00062 ucr_nbytes = sizeof(icUInt32Number) + 00063 (UCR_CURVE_SIZE * sizeof(icUInt16Number)); 00064 bg_nbytes = sizeof(icUInt32Number) + 00065 (BG_CURVE_SIZE * sizeof(icUInt16Number)); 00066 00067 ucrBgWrite = (icUcrBg *)malloc((ucr_nbytes + bg_nbytes)); 00068 00069 ucrCurve = (icUcrBgCurve *)ucrBgWrite->data; 00070 ucrCurve->count = UCR_CURVE_SIZE; 00071 for (i=0; i<ucrCurve->count; i++) 00072 ucrCurve->curve[i] = (icUInt16Number)i; 00073 00074 bgCurve = (icUcrBgCurve *)((char *)ucrCurve + ucr_nbytes); 00075 bgCurve->count = BG_CURVE_SIZE; 00076 for (i=0; i<bgCurve->count; i++) 00077 bgCurve->curve[i] = 255 - (icUInt16Number)i; 00078 * 00079 */ 00080 00081 /* 00082 * Many of the structures contain variable length arrays. This 00083 * is represented by the use of the convention. 00084 * 00085 * type data[icAny]; 00086 */ 00087 00088 /*------------------------------------------------------------------------*/ 00089 /* 00090 * Defines used in the specification 00091 */ 00092 #define icMagicNumber 0x61637370 /* 'acsp' */ 00093 #define icVersionNumber 0x02000000 /* 2.0, BCD */ 00094 00095 /* Screening Encodings */ 00096 #define icPrtrDefaultScreensFalse 0x00000000 /* Bit position 0 */ 00097 #define icPrtrDefaultScreensTrue 0x00000001 /* Bit position 0 */ 00098 #define icLinesPerInch 0x00000002 /* Bit position 1 */ 00099 #define icLinesPerCm 0x00000000 /* Bit position 1 */ 00100 00101 /* 00102 * Device attributes, currently defined values correspond 00103 * to the low 4 bytes of the 8 byte attribute quantity, see 00104 * the header for their location. 00105 */ 00106 #define icReflective 0x00000000 /* Bit position 0 */ 00107 #define icTransparency 0x00000001 /* Bit position 0 */ 00108 #define icGlossy 0x00000000 /* Bit position 1 */ 00109 #define icMatte 0x00000002 /* Bit position 1 */ 00110 00111 /* 00112 * Profile header flags, the low 16 bits are reserved for consortium 00113 * use. 00114 */ 00115 #define icEmbeddedProfileFalse 0x00000000 /* Bit position 0 */ 00116 #define icEmbeddedProfileTrue 0x00000001 /* Bit position 0 */ 00117 #define icUseAnywhere 0x00000000 /* Bit position 1 */ 00118 #define icUseWithEmdeddedDataOnly 0x00000002 /* Bit position 1 */ 00119 00120 /* Ascii or Binary data */ 00121 #define icAsciiData 0x00000000 /* Used in dataType */ 00122 #define icBinaryData 0x00000001 00123 00124 /* 00125 * Define used to indicate that this is a variable length array 00126 */ 00127 #define icAny 1 00128 00129 /*------------------------------------------------------------------------*/ 00130 /* 00131 * Signatures, these are basically 4 byte identifiers 00132 * used to differentiate between tags and other items 00133 * in the profile format. 00134 */ 00135 typedef unsigned char icSignature[4]; 00136 00137 typedef unsigned char icTagSignature[4]; 00138 /* public tags and sizes */ 00139 #define icSigAToB0Tag 0x41324230 /* 'A2B0' */ 00140 #define icSigAToB1Tag 0x41324231 /* 'A2B1' */ 00141 #define icSigAToB2Tag 0x41324232 /* 'A2B2' */ 00142 #define icSigAToB3Tag 0x41324233 /* 'A2B2' */ 00143 #define icSigBlueColorantTag 0x6258595A /* 'bXYZ' */ 00144 #define icSigBlueTRCTag 0x62545243 /* 'bTRC' */ 00145 #define icSigBToA0Tag 0x42324130 /* 'B2A0' */ 00146 #define icSigBToA1Tag 0x42324131 /* 'B2A1' */ 00147 #define icSigBToA2Tag 0x42324132 /* 'B2A2' */ 00148 #define icSigBToA3Tag 0x42324133 /* 'B2A3' */ 00149 #define icSigCalibrationDateTimeTag 0x63616C74 /* 'calt' */ 00150 #define icSigCharTargetTag 0x74617267 /* 'targ' */ 00151 #define icSigCopyrightTag 0x63707274 /* 'cprt' */ 00152 #define icSigDeviceMfgDescTag 0x646D6E64 /* 'dmnd' */ 00153 #define icSigDeviceModelDescTag 0x646D6464 /* 'dmdd' */ 00154 #define icSigGamutTag 0x676d7420 /* 'gmt ' */ 00155 #define icSigGrayTRCTag 0x6b545243 /* 'kTRC' */ 00156 #define icSigGreenColorantTag 0x6758595A /* 'gXYZ' */ 00157 #define icSigGreenTRCTag 0x67545243 /* 'gTRC' */ 00158 #define icSigLuminanceTag 0x6C756d69 /* 'lumi' */ 00159 #define icSigMeasurementTag 0x6D656173 /* 'meas' */ 00160 #define icSigMediaBlackPointTag 0x626B7074 /* 'bkpt' */ 00161 #define icSigMediaWhitePointTag 0x77747074 /* 'wtpt' */ 00162 #define icSigNamedColorTag 0x6E636f6C /* 'ncol' */ 00163 #define icSigPreview0Tag 0x70726530 /* 'pre0' */ 00164 #define icSigPreview1Tag 0x70726531 /* 'pre1' */ 00165 #define icSigPreview2Tag 0x70726532 /* 'pre2' */ 00166 #define icSigProfileDescriptionTag 0x64657363 /* 'desc' */ 00167 #define icSigProfileSequenceDescTag 0x70736571 /* 'pseq' */ 00168 #define icSigPs2CRD0Tag 0x70736430 /* 'psd0' */ 00169 #define icSigPs2CRD1Tag 0x70736431 /* 'psd1' */ 00170 #define icSigPs2CRD2Tag 0x70736432 /* 'psd2' */ 00171 #define icSigPs2CRD3Tag 0x70736433 /* 'psd3' */ 00172 #define icSigPs2CSATag 0x70733273 /* 'ps2s' */ 00173 #define icSigPs2Intent0Tag 0x70736930 /* 'psi0' */ 00174 #define icSigPs2Intent1Tag 0x70736931 /* 'psi1' */ 00175 #define icSigPs2Intent2Tag 0x70736932 /* 'psi2' */ 00176 #define icSigPs2Intent3Tag 0x70736933 /* 'psi3' */ 00177 #define icSigRedColorantTag 0x7258595A /* 'rXYZ' */ 00178 #define icSigRedTRCTag 0x72545243 /* 'rTRC' */ 00179 #define icSigScreeningDescTag 0x73637264 /* 'scrd' */ 00180 #define icSigScreeningTag 0x7363726E /* 'scrn' */ 00181 #define icSigTechnologyTag 0x74656368 /* 'tech' */ 00182 #define icSigUcrBgTag 0x62666420 /* 'bfd ' */ 00183 #define icSigViewingCondDescTag 0x76756564 /* 'vued' */ 00184 #define icSigViewingConditionsTag 0x76696577 /* 'view' */ 00185 #define icSigK007Tag 0x4B303037 /* 'K007' */ 00186 #define icMaxEnumTag 0xFFFFFFFF /* enum = 4 00187 bytes max */ 00188 00189 typedef unsigned char icTechnologySignature[4]; 00190 /* technology signature descriptions */ 00191 #define icSigFilmScanner 0x6673636E /* 'fscn' */ 00192 #define icSigReflectiveScanner 0x7273636E /* 'rscn' */ 00193 #define icSigInkJetPrinter 0x696A6574 /* 'ijet' */ 00194 #define icSigThermalWaxPrinter 0x74776178 /* 'twax' */ 00195 #define icSigElectrophotographicPrinter 0x6570686F /* 'epho' */ 00196 #define icSigElectrostaticPrinter 0x65737461 /* 'esta' */ 00197 #define icSigDyeSublimationPrinter 0x64737562 /* 'dsub' */ 00198 #define icSigPhotographicPaperPrinter 0x7270686F /* 'rpho' */ 00199 #define icSigFilmWriter 0x6670726E /* 'fprn' */ 00200 #define icSigVideoMonitor 0x7669646D /* 'vidm' */ 00201 #define icSigVideoCamera 0x76696463 /* 'vidc' */ 00202 #define icSigProjectionTelevision 0x706A7476 /* 'pjtv' */ 00203 #define icSigCRTDisplay 0x43525420 /* 'CRT ' */ 00204 #define icSigPMDisplay 0x504D4420 /* 'PMD ' */ 00205 #define icSigAMDisplay 0x414D4420 /* 'AMD ' */ 00206 #define icSigPhotoCD 0x4B504344 /* 'KPCD' */ 00207 #define icSigPhotoImageSetter 0x696D6773 /* 'imgs' */ 00208 #define icSigGravure 0x67726176 /* 'grav' */ 00209 #define icSigOffsetLithography 0x6F666673 /* 'offs' */ 00210 #define icSigSilkscreen 0x73696C6B /* 'silk' */ 00211 #define icSigFlexography 0x666C6578 /* 'flex' */ 00212 #define icSigMediaType 0x4D533031 /* 'MS01' */ 00213 #define icSigDitherType 0x4D533032 /* 'MS02' */ 00214 #define icSigResolution 0x4D533033 /* 'MS03' */ 00215 #define icMaxEnumTechnology 0xFFFFFFFF /* enum = 4 00216 bytes max */ 00217 00218 typedef unsigned char icTagTypeSignature[4]; 00219 /* type signatures */ 00220 #define icSigCurveType 0x63757276 /* 'curv' */ 00221 #define icSigDataType 0x64617461 /* 'data' */ 00222 #define icSigDateTimeType 0x6474696D /* 'dtim' */ 00223 #define icSigLut16Type 0x6d667432 /* 'mft2' */ 00224 #define icSigLut8Type 0x6d667431 /* 'mft1' */ 00225 #define icSigMeasurementType 0x6D656173 /* 'meas' */ 00226 #define icSigNamedColorType 0x6E636f6C /* 'ncol' */ 00227 #define icSigProfileSequenceDescType 0x70736571 /* 'pseq' */ 00228 #define icSigS15Fixed16ArrayType 0x73663332 /* 'sf32' */ 00229 #define icSigScreeningType 0x7363726E /* 'scrn' */ 00230 #define icSigSignatureType 0x73696720 /* 'sig ' */ 00231 #define icSigTextType 0x74657874 /* 'text' */ 00232 #define icSigTextDescriptionType 0x64657363 /* 'desc' */ 00233 #define icSigU16Fixed16ArrayType 0x75663332 /* 'uf32' */ 00234 #define icSigUcrBgType 0x62666420 /* 'bfd ' */ 00235 #define icSigUInt16ArrayType 0x75693136 /* 'ui16' */ 00236 #define icSigUInt32ArrayType 0x75693332 /* 'ui32' */ 00237 #define icSigUInt64ArrayType 0x75693634 /* 'ui64' */ 00238 #define icSigUInt8ArrayType 0x75693038 /* 'ui08' */ 00239 #define icSigViewingConditionsType 0x76696577 /* 'view' */ 00240 #define icSigXYZType 0x58595A20 /* 'XYZ ' */ 00241 #define icMaxEnumType 0xFFFFFFFF /* enum = 4 00242 bytes max */ 00243 00244 /* 00245 * Color Space Signatures 00246 * Note that only icSigXYZData and icSigLabData are valid 00247 * Profile Connection Spaces (PCSs) 00248 */ 00249 typedef unsigned char icColorSpaceSignature[4]; 00250 #define icSigXYZData 0x58595A20 /* 'XYZ ' */ 00251 #define icSigLabData 0x4C616220 /* 'Lab ' */ 00252 #define icSigLuvData 0x4C757620 /* 'Luv ' */ 00253 #define icSigYCbCrData 0x59436272 /* 'YCbr' */ 00254 #define icSigYxyData 0x59787920 /* 'Yxy ' */ 00255 #define icSigRgbData 0x52474220 /* 'RGB ' */ 00256 #define icSigGrayData 0x47524159 /* 'GRAY' */ 00257 #define icSigHsvData 0x48535620 /* 'HSV ' */ 00258 #define icSigHlsData 0x484C5320 /* 'HLS ' */ 00259 #define icSigCmykData 0x434D594B /* 'CMYK' */ 00260 #define icSigCmyData 0x434D5920 /* 'CMY ' */ 00261 #define icSigDefData 0x44454620 /* 'DEF ' New Definition */ 00262 #define icMaxEnumData 0xFFFFFFFF /* enum = 4 00263 bytes max */ 00264 00265 /* profileClass enumerations */ 00266 typedef unsigned char icProfileClassSignature[4]; 00267 #define icSigInputClass 0x73636E72 /* 'scnr' */ 00268 #define icSigDisplayClass 0x6D6E7472 /* 'mntr' */ 00269 #define icSigOutputClass 0x70727472 /* 'prtr' */ 00270 #define icSigLinkClass 0x6C696E6B /* 'link' */ 00271 #define icSigAbstractClass 0x61627374 /* 'abst' */ 00272 #define icSigColorSpaceClass 0x73706163 /* 'spac' */ 00273 #define icMaxEnumClass 0xFFFFFFFF /* enum = 4 00274 bytes max */ 00275 00276 /* Platform Signatures */ 00277 typedef unsigned char icPlatformSignature[4]; 00278 #define icSigMacintosh 0x4150504C /* 'APPL' */ 00279 #define icSigMicrosoft 0x4D534654 /* 'MSFT' */ 00280 #define icSigSolaris 0x53554E57 /* 'SUNW' */ 00281 #define icSigSGI 0x53474920 /* 'SGI ' */ 00282 #define icSigTaligent 0x54474E54 /* 'TGNT' */ 00283 #define icMaxEnumPlatform 0xFFFFFFFF /* enum = 4 00284 bytes max */ 00285 00286 /*------------------------------------------------------------------------*/ 00287 /* 00288 * Other enums 00289 */ 00290 00291 /* Measurement Flare, used in the measurmentType tag */ 00292 typedef unsigned char icMeasurementFlare[4]; 00293 #define icFlare0 0x00000000 /* 0% flare */ 00294 #define icFlare100 0x00000001 /* 100% flare */ 00295 #define icMaxFlare 0xFFFFFFFF /* enum = 4 bytes max */ 00296 00297 /* Measurement Geometry, used in the measurmentType tag */ 00298 typedef unsigned char icMeasurementGeometry[4]; 00299 #define icGeometryUnknown 0x00000000 /* Unknown geometry */ 00300 #define icGeometry045or450 0x00000001 /* 0/45 or 45/0 */ 00301 #define icGeometry0dord0 0x00000002 /* 0/d or d/0 */ 00302 #define icMaxGeometry 0xFFFFFFFF /* enum = 4 bytes max */ 00303 00304 /* Rendering Intents, used in the profile header */ 00305 typedef unsigned char icRenderingIntent[4]; 00306 #define icPerceptual 0 00307 #define icRelativeColorimetric 1 00308 #define icSaturation 2 00309 #define icAbsoluteColorimetric 3 00310 #define icUseRenderingIntent 0xFFFFFFFF /* New Definition */ 00311 #define icMaxEnumIntent 0xFFFFFFFF /* enum = 4 bytes max */ 00312 00313 /* Different Spot Shapes currently defined, used for screeningType */ 00314 typedef unsigned char icSpotShape[4]; 00315 #define icSpotShapeUnknown 0 00316 #define icSpotShapePrinterDefault 1 00317 #define icSpotShapeRound 2 00318 #define icSpotShapeDiamond 3 00319 #define icSpotShapeEllipse 4 00320 #define icSpotShapeLine 5 00321 #define icSpotShapeSquare 6 00322 #define icSpotShapeCross 7 00323 #define icMaxEnumSpot 0xFFFFFFFF /* enum = 4 bytes max */ 00324 00325 /* Standard Observer, used in the measurmentType tag */ 00326 typedef unsigned char icStandardObserver[4]; 00327 #define icStdObsUnknown 0x00000000 /* Unknown observer */ 00328 #define icStdObs1931TwoDegrees 0x00000001 /* 1931 two degrees */ 00329 #define icStdObs1964TenDegrees 0x00000002 /* 1961 ten degrees */ 00330 #define icMaxStdObs 0xFFFFFFFF /* enum = 4 bytes max */ 00331 00332 /* Pre-defined illuminants, used in measurement and viewing conditions type */ 00333 typedef unsigned char icIlluminant[4]; 00334 #define icIlluminantUnknown = 0x00000000 00335 #define icIlluminantD50 = 0x00000001 00336 #define icIlluminantD65 = 0x00000002 00337 #define icIlluminantD93 = 0x00000003 00338 #define icIlluminantF2 = 0x00000004 00339 #define icIlluminantD55 = 0x00000005 00340 #define icIlluminantA = 0x00000006 00341 #define icIlluminantEquiPowerE = 0x00000007 /* Equi-Power (E) */ 00342 #define icIlluminantF8 = 0x00000008 00343 #define icMaxEnumIluminant = 0xFFFFFFFF /* enum = 4 00344 00345 /*------------------------------------------------------------------------*/ 00346 /* 00347 * Number definitions 00348 */ 00349 00350 /* Unsigned integer numbers */ 00351 typedef unsigned char icUInt8Number; 00352 typedef unsigned char icUInt16Number[2]; 00353 typedef unsigned char icUInt32Number[4]; 00354 typedef unsigned char icUInt64Number[8]; 00355 00356 /* Signed numbers */ 00357 typedef signed char icInt8Number; 00358 typedef signed char icInt16Number[2]; 00359 typedef signed char icInt32Number[4]; 00360 typedef signed char icInt64Number[8]; 00361 00362 /* Fixed numbers */ 00363 typedef signed char icS15Fixed16Number[4]; 00364 typedef unsigned char icU16Fixed16Number[4]; 00365 00366 /*------------------------------------------------------------------------*/ 00367 /* 00368 * Arrays of numbers 00369 */ 00370 00371 /* Int8 Array */ 00372 typedef struct { 00373 icInt8Number data[icAny]; /* Variable array of values */ 00374 } icInt8Array; 00375 00376 /* UInt8 Array */ 00377 typedef struct { 00378 icUInt8Number data[icAny]; /* Variable array of values */ 00379 } icUInt8Array; 00380 00381 /* uInt16 Array */ 00382 typedef struct { 00383 icUInt16Number data[icAny]; /* Variable array of values */ 00384 } icUInt16Array; 00385 00386 /* Int16 Array */ 00387 typedef struct { 00388 icInt16Number data[icAny]; /* Variable array of values */ 00389 } icInt16Array; 00390 00391 /* uInt32 Array */ 00392 typedef struct { 00393 icUInt32Number data[icAny]; /* Variable array of values */ 00394 } icUInt32Array; 00395 00396 /* Int32 Array */ 00397 typedef struct { 00398 icInt32Number data[icAny]; /* Variable array of values */ 00399 } icInt32Array; 00400 00401 /* UInt64 Array */ 00402 typedef struct { 00403 icUInt64Number data[icAny]; /* Variable array of values */ 00404 } icUInt64Array; 00405 00406 /* Int64 Array */ 00407 typedef struct { 00408 icInt64Number data[icAny]; /* Variable array of values */ 00409 } icInt64Array; 00410 00411 /* u16Fixed16 Array */ 00412 typedef struct { 00413 icU16Fixed16Number data[icAny]; /* Variable array of values */ 00414 } icU16Fixed16Array; 00415 00416 /* s15Fixed16 Array */ 00417 typedef struct { 00418 icS15Fixed16Number data[icAny]; /* Variable array of values */ 00419 } icS15Fixed16Array; 00420 00421 /* The base date time number */ 00422 typedef struct { 00423 icUInt16Number year; 00424 icUInt16Number month; 00425 icUInt16Number day; 00426 icUInt16Number hours; 00427 icUInt16Number minutes; 00428 icUInt16Number seconds; 00429 } icDateTimeNumber; 00430 00431 /* XYZ Number */ 00432 typedef struct { 00433 icS15Fixed16Number X; 00434 icS15Fixed16Number Y; 00435 icS15Fixed16Number Z; 00436 } icXYZNumber; 00437 00438 /* XYZ Array */ 00439 typedef struct { 00440 icXYZNumber data[icAny]; /* Variable array of XYZ numbers */ 00441 } icXYZArray; 00442 00443 /* Curve */ 00444 typedef struct { 00445 icUInt32Number count; /* Number of entries */ 00446 icUInt16Number data[icAny]; /* The actual table data, real 00447 * number is determined by count 00448 */ 00449 } icCurve; 00450 00451 /* Data */ 00452 typedef struct { 00453 icUInt32Number dataFlag; /* 0 = ascii, 1 = binary */ 00454 icInt8Number data[icAny]; /* Data, size determined from tag */ 00455 } icData; 00456 00457 /* lut16 */ 00458 typedef struct { 00459 icUInt8Number inputChan; /* Number of input channels */ 00460 icUInt8Number outputChan; /* Number of output channels */ 00461 icUInt8Number clutPoints; /* Number of clutTable grid points */ 00462 icInt8Number pad; /* Padding for byte alignment */ 00463 icS15Fixed16Number e00; /* e00 in the 3 * 3 */ 00464 icS15Fixed16Number e01; /* e01 in the 3 * 3 */ 00465 icS15Fixed16Number e02; /* e02 in the 3 * 3 */ 00466 icS15Fixed16Number e10; /* e10 in the 3 * 3 */ 00467 icS15Fixed16Number e11; /* e11 in the 3 * 3 */ 00468 icS15Fixed16Number e12; /* e12 in the 3 * 3 */ 00469 icS15Fixed16Number e20; /* e20 in the 3 * 3 */ 00470 icS15Fixed16Number e21; /* e21 in the 3 * 3 */ 00471 icS15Fixed16Number e22; /* e22 in the 3 * 3 */ 00472 icUInt16Number inputEnt; /* Number of input table entries */ 00473 icUInt16Number outputEnt; /* Number of output table entries */ 00474 icUInt16Number data[icAny]; /* Data follows see spec for size */ 00475 /* 00476 * Data that follows is of this form 00477 * 00478 * icUInt16Number inputTable[inputChan][icAny]; * The input table 00479 * icUInt16Number clutTable[icAny]; * The clut table 00480 * icUInt16Number outputTable[outputChan][icAny]; * The output table 00481 */ 00482 } icLut16; 00483 00484 /* lut8, input & output tables are always 256 bytes in length */ 00485 typedef struct { 00486 icUInt8Number inputChan; /* Number of input channels */ 00487 icUInt8Number outputChan; /* Number of output channels */ 00488 icUInt8Number clutPoints; /* Number of clutTable grid points */ 00489 icInt8Number pad; 00490 icS15Fixed16Number e00; /* e00 in the 3 * 3 */ 00491 icS15Fixed16Number e01; /* e01 in the 3 * 3 */ 00492 icS15Fixed16Number e02; /* e02 in the 3 * 3 */ 00493 icS15Fixed16Number e10; /* e10 in the 3 * 3 */ 00494 icS15Fixed16Number e11; /* e11 in the 3 * 3 */ 00495 icS15Fixed16Number e12; /* e12 in the 3 * 3 */ 00496 icS15Fixed16Number e20; /* e20 in the 3 * 3 */ 00497 icS15Fixed16Number e21; /* e21 in the 3 * 3 */ 00498 icS15Fixed16Number e22; /* e22 in the 3 * 3 */ 00499 icUInt8Number data[icAny]; /* Data follows see spec for size */ 00500 /* 00501 * Data that follows is of this form 00502 * 00503 * icUInt8Number inputTable[inputChan][256]; * The input table 00504 * icUInt8Number clutTable[icAny]; * The clut table 00505 * icUInt8Number outputTable[outputChan][256]; * The output table 00506 */ 00507 } icLut8; 00508 00509 /* Measurement Data */ 00510 typedef struct { 00511 icStandardObserver stdObserver; /* Standard observer */ 00512 icXYZNumber backing; /* XYZ for backing material */ 00513 icMeasurementGeometry geometry; /* Measurement geometry */ 00514 icMeasurementFlare flare; /* Measurement flare */ 00515 icIlluminant illuminant; /* Illuminant */ 00516 } icMeasurement; 00517 00518 /* Named color */ 00519 typedef struct { 00520 icUInt32Number vendorFlag; /* Bottom 16 bits for IC use */ 00521 icUInt32Number count; /* Count of named colors */ 00522 icInt8Number data[icAny]; /* Named color data follows */ 00523 /* 00524 * Data that follows is of this form 00525 * 00526 * icInt8Number prefix[icAny]; * Prefix for the color name, max = 32 00527 * icInt8Number suffix[icAny]; * Suffix for the color name, max = 32 00528 * icInt8Number root1[icAny]; * Root name for first color, max = 32 00529 * icInt8Number coords1[icAny]; * Color co-ordinates of first color 00530 * icInt8Number root2[icAny]; * Root name for first color, max = 32 00531 * icInt8Number coords2[icAny]; * Color co-ordinates of first color 00532 * : 00533 * : 00534 * Repeat for root name and color co-ordinates up to (count-1) 00535 */ 00536 } icNamedColor; 00537 00538 /* Profile sequence structure */ 00539 typedef struct { 00540 icSignature deviceMfg; /* Device Manufacturer */ 00541 icSignature deviceModel; /* Decvice Model */ 00542 icUInt64Number attributes; /* Device attributes */ 00543 icTechnologySignature technology; /* Technology signature */ 00544 icInt8Number data[icAny]; /* Descriptions text 00545 follows */ 00546 /* 00547 * Data that follows is of this form 00548 * 00549 * icTextDescription deviceMfgDesc[icAny]; * Manufacturer text 00550 * icTextDescription modelDesc[icAny]; * Model text 00551 */ 00552 } icDescStruct; 00553 00554 /* Profile sequence description */ 00555 typedef struct { 00556 icUInt32Number count; /* Number of descriptions */ 00557 icDescStruct data[icAny]; /* Array of description struct */ 00558 } icProfileSequenceDesc; 00559 00560 /* textDescription */ 00561 typedef struct { 00562 icUInt32Number count; /* Description length */ 00563 icInt8Number data[icAny]; /* Descriptions follow */ 00564 /* 00565 * Data that follows is of this form 00566 * 00567 * icInt8Number desc[icAny] * NULL terminated ascii string 00568 * icUInt32Number ucLangCode; * UniCode language code 00569 * icUInt32Number ucCount; * UniCode description length 00570 * icInt8Number ucDesc[icAny; * The UniCode description 00571 * icUInt16Number scCode; * ScriptCode code 00572 * icUInt8Number scCount; * ScriptCode count 00573 * icInt8Number scDesc[64]; * ScriptCode Description 00574 */ 00575 } icTextDescription; 00576 00577 /* Screening Data */ 00578 typedef struct { 00579 icS15Fixed16Number frequency; /* Frequency */ 00580 icS15Fixed16Number angle; /* Screen angle */ 00581 icSpotShape spotShape; /* Spot Shape encodings below */ 00582 } icScreeningData; 00583 00584 typedef struct { 00585 icUInt32Number screeningFlag; /* Screening flag */ 00586 icUInt32Number channels; /* Number of channels */ 00587 icScreeningData data[icAny]; /* Array of screening data */ 00588 } icScreening; 00589 00590 /* Text Data */ 00591 typedef struct { 00592 icInt8Number data[icAny]; /* Variable array of characters */ 00593 } icText; 00594 00595 /* Structure describing either a UCR or BG curve */ 00596 typedef struct { 00597 icUInt32Number count; /* Curve length */ 00598 icUInt16Number curve[icAny]; /* The array of curve values */ 00599 } icUcrBgCurve; 00600 00601 /* Under color removal, black generation */ 00602 typedef struct { 00603 icUInt8Number data[icAny]; /* The Ucr BG data */ 00604 /* 00605 * Data that follows is of this form 00606 * 00607 * icUcrBgCurve ucr; * Ucr curve 00608 * icUcrBgCurve bg; * Bg curve 00609 */ 00610 } icUcrBg; 00611 00612 /* viewingConditionsType */ 00613 typedef struct { 00614 icXYZNumber illuminant; /* In candelas per metre sq'd */ 00615 icXYZNumber surround; /* In candelas per metre sq'd */ 00616 icIlluminant stdIluminant; /* See icIlluminant defines */ 00617 } icViewingCondition; 00618 00619 00620 /*------------------------------------------------------------------------*/ 00621 /* 00622 * Tag Type definitions 00623 */ 00624 00625 /* 00626 * Many of the structures contain variable length arrays. This 00627 * is represented by the use of the convention. 00628 * 00629 * type data[icAny]; 00630 */ 00631 00632 /* The base part of each tag */ 00633 typedef struct { 00634 icTagTypeSignature sig; /* Signature */ 00635 icInt8Number reserved[4]; /* Reserved, set to 0 */ 00636 } icTagBase; 00637 00638 /* curveType */ 00639 typedef struct { 00640 icTagBase base; /* Signature, "curv" */ 00641 icCurve curve; /* The curve data */ 00642 } icCurveType; 00643 00644 /* dataType */ 00645 typedef struct { 00646 icTagBase base; /* Signature, "data" */ 00647 icData data; /* The data structure */ 00648 } icDataType; 00649 00650 /* dateTimeType */ 00651 typedef struct { 00652 icTagBase base; /* Signature, "dtim" */ 00653 icDateTimeNumber date; /* The date */ 00654 } icDateTimeType; 00655 00656 /* lut16Type */ 00657 typedef struct { 00658 icTagBase base; /* Signature, "mft2" */ 00659 icLut16 lut; /* Lut16 data */ 00660 } icLut16Type; 00661 00662 /* lut8Type, input & output tables are always 256 bytes in length */ 00663 typedef struct { 00664 icTagBase base; /* Signature, "mft1" */ 00665 icLut8 lut; /* Lut8 data */ 00666 } icLut8Type; 00667 00668 /* Measurement Type */ 00669 typedef struct { 00670 icTagBase base; /* Signature, "meas" */ 00671 icMeasurement measurement; /* Measurement data */ 00672 } icMeasurementType; 00673 00674 /* Named color type */ 00675 typedef struct { 00676 icTagBase base; /* Signature, "ncol" */ 00677 icNamedColor ncolor; /* Named color data */ 00678 } icNamedColorType; 00679 00680 /* Profile sequence description type */ 00681 typedef struct { 00682 icTagBase base; /* Signature, "pseq" */ 00683 icProfileSequenceDesc desc; /* The seq description */ 00684 } icProfileSequenceDescType; 00685 00686 /* textDescriptionType */ 00687 typedef struct { 00688 icTagBase base; /* Signature, "desc" */ 00689 icTextDescription desc; /* The description */ 00690 } icTextDescriptionType; 00691 00692 /* s15Fixed16Type */ 00693 typedef struct { 00694 icTagBase base; /* Signature, "sf32" */ 00695 icS15Fixed16Array data; /* Array of values */ 00696 } icS15Fixed16ArrayType; 00697 00698 typedef struct { 00699 icTagBase base; /* Signature, "scrn" */ 00700 icScreening screen; /* Screening structure */ 00701 } icScreeningType; 00702 00703 /* sigType */ 00704 typedef struct { 00705 icTagBase base; /* Signature, "sig" */ 00706 icSignature signature; /* The signature data */ 00707 } icSignatureType; 00708 00709 /* textType */ 00710 typedef struct { 00711 icTagBase base; /* Signature, "text" */ 00712 icText data; /* Variable array of characters */ 00713 } icTextType; 00714 00715 /* u16Fixed16Type */ 00716 typedef struct { 00717 icTagBase base; /* Signature, "uf32" */ 00718 icU16Fixed16Array data; /* Variable array of values */ 00719 } icU16Fixed16ArrayType; 00720 00721 /* Under color removal, black generation type */ 00722 typedef struct { 00723 icTagBase base; /* Signature, "bfd " */ 00724 icUcrBg data; /* ucrBg structure */ 00725 } icUcrBgType; 00726 00727 /* uInt16Type */ 00728 typedef struct { 00729 icTagBase base; /* Signature, "ui16" */ 00730 icUInt16Array data; /* Variable array of values */ 00731 } icUInt16ArrayType; 00732 00733 /* uInt32Type */ 00734 typedef struct { 00735 icTagBase base; /* Signature, "ui32" */ 00736 icUInt32Array data; /* Variable array of values */ 00737 } icUInt32ArrayType; 00738 00739 /* uInt64Type */ 00740 typedef struct { 00741 icTagBase base; /* Signature, "ui64" */ 00742 icUInt64Array data; /* Variable array of values */ 00743 } icUInt64ArrayType; 00744 00745 /* uInt8Type */ 00746 typedef struct { 00747 icTagBase base; /* Signature, "ui08" */ 00748 icUInt8Array data; /* Variable array of values */ 00749 } icUInt8ArrayType; 00750 00751 /* viewingConditionsType */ 00752 typedef struct { 00753 icTagBase base; /* Signature, "view" */ 00754 icViewingCondition view; /* Viewing conditions */ 00755 } icViewingConditionType; 00756 00757 /* XYZ Type */ 00758 typedef struct { 00759 icTagBase base; /* Signature, "XYZ" */ 00760 icXYZArray data; /* Variable array of XYZ numbers */ 00761 } icXYZType; 00762 00763 /*------------------------------------------------------------------------*/ 00764 00765 /* 00766 * Lists of tags, tags, profile header and profile strcuture 00767 */ 00768 00769 /* A tag */ 00770 typedef struct { 00771 icTagSignature sig; /* The tag signature */ 00772 icUInt32Number offset; /* Start of tag relative to 00773 * start of header, Spec Section 8 */ 00774 icUInt32Number size; /* Size in bytes */ 00775 } icTag; 00776 00777 /* A Structure that may be used independently for a list of tags */ 00778 typedef struct { 00779 icUInt32Number count; /* Number of tags in the profile */ 00780 icTag tags[icAny]; /* Variable array of tags */ 00781 } icTagList; 00782 00783 /* The Profile header */ 00784 typedef struct { 00785 icUInt32Number size; /* Profile size in bytes */ 00786 icSignature cmmId; /* CMM for this profile */ 00787 icUInt32Number version; /* Format version number */ 00788 icProfileClassSignature deviceClass; /* Type of profile */ 00789 icColorSpaceSignature colorSpace; /* Color space of data */ 00790 icColorSpaceSignature pcs; /* PCS, XYZ or Lab only */ 00791 icDateTimeNumber date; /* Date profile was created */ 00792 icSignature magic; /* icMagicNumber */ 00793 icPlatformSignature platform; /* Primary Platform */ 00794 icUInt32Number flags; /* Various bit settings */ 00795 icSignature manufacturer; /* Device manufacturer */ 00796 icUInt32Number model; /* Device model number */ 00797 icUInt64Number attributes; /* Device attributes */ 00798 icUInt32Number renderingIntent;/* Rendering intent */ 00799 icXYZNumber illuminant; /* Profile illuminant */ 00800 icInt8Number reserved[48]; /* Reserved for future use */ 00801 } icHeader; 00802 00803 /* 00804 * A profile, 00805 * we can't use icTagList here because its not at the end of the structure 00806 */ 00807 typedef struct { 00808 icHeader header; /* The header */ 00809 icUInt32Number count; /* Number of tags in the profile */ 00810 icInt8Number data[icAny]; /* The tagTable and tagData */ 00811 /* 00812 * Data that follows is of the form 00813 * 00814 * icTag tagTable[icAny]; * The tag table 00815 * icInt8Number tagData[icAny]; * The tag data 00816 */ 00817 } icProfile; 00818 00819 /*------------------------------------------------------------------------*/ 00820 #endif 00821

Generated on Sat May 15 19:40:19 2004 for test by doxygen 1.3.7