KCMS Application Developer's Guide
  Suchtext Nur in diesem Buch
Dieses Buch im PDF-Format herunterladen

KCMS Profile Attributes and ICC Tags

5

Every profile contains a group of attributes (or tags) that describes the characteristics of the profile. Attributes and tags are specified by name, value, and status (whether they are required or optional). Attributes and tags are identical; the term attributes existed before the ICC tags came into use. Attributes are KCMS-framework specific. Tags are primarily defined in the ICC specification (and the icc.h header file), except for a few that are KCMS-framework specific. These tags are defined in the kcstypes.h header file and are registered with the ICC. Tags are discussed in this chapter.
Several API functions create and modify tags, while others define what is stored in a tag; see Chapter 4, "Functions" for detailed descriptions of all functions.

Tags

A tag is defined with an enumerated constant listed in icc.h. The enumerated constant, icTagSignature is a list of all available tags. Use the attribute name as an argument to the API calls KcsGetAttribute() and KcsSetAttribute().

Attribute Value

An attribute's value is defined in the val field of the KcsAttributeValue data structure (see page 27). Since there are many possible data types for val, you need some way of interpreting the value as the correct data type. The KcsAttributeType data type provides this interface (see page 26).

Required and Optional Attributes

Attributes are either required or optional for all profiles. The software that creates the profile must assign required attributes.

KCMS Framework Tags

The following tags are KCMS-framework specific. They are not defined in the ICC specification (or icc.h); they are defined in the kcstypes.h header file. These tags are never stored in a profile. They are used to access portions of an ICC profile that are not covered by tags.

icSigHeaderTag

#define icSigHeaderTag (0x69636864UL) /* 'ichd' */

This data structure is an ICC header. The header file contains useful attribute information.

icSigNumTag

#define icSigNumTag (0x6E746167UL) /* 'ntag' */

This data structure returns a KcsULong value that is the number of ICC profile attributes and tags in a file. This is a read-only attribute; it cannot be set. The count includes the icSigHeaderTag, icSigNumTag and icSigListTag entries.

icSigListTag

#define icSigListTag (0x6C746167UL) /* 'ltag' */

This data structure is a list of the ICC attributes and tags in a profile.

Example

The following code sample shows you how to use the icSigNumTag and icSigListTag data structures.
Code Example 5-1 icSigNumTag and icSigListTag

  #include <kcms/kcs.h>  
  KcsAttributeValue attrValue, *attrPtr;  
  int                   i;  
  char                  *tmp;  
  
  /* Set the value of countSupplied */  
  attrValue.base.countSupplied = 1;  
  attrValue.base.type = KcsULong;  
  
  /* Get the number of attributes in the profile */  
  status = KcsGetAttribute(profile, icSigNumTag, &attrValue);  
  if (status != KCS_SUCCESS) {  
       KcsFreeProfile(profile);  
       exit(1);  
  }  
  
  /* Make space to get a list of all tags */  
  size = sizeof(KcsAttributeBase) + sizeof(long)*attrValue.val.uLongVal[0];  
  if ((attrPtr = (KcsAttributeValue *)malloc(size)) == NULL) {  
       perror("malloc failed : ");  
       KcsFreeProfile(profile);  
       exit(1);  
  }  
  
  /* Get the list of tags */  
  attrPtr->base.type = KcsULong;  
  attrPtr->base.sizeOfType = sizeof(long);  
  attrPtr->base.countSupplied = attrValue.val.uLongVal[0];  
  status = KcsGetAttribute(profile, icSigListTag, attrPtr);  
  if (status != KCS_SUCCESS) {  
       KcsFreeProfile(profile);  
       free (attrPtr);  
       exit(1);  
  }  
  
  /* Print the list */  
  printf("Number of tags = %d\n", attrPtr->base.countSupplied);  
  for (i=0; i<attrPtr->base.countSupplied; i++) {  
       tmp = (char *)&attrPtr->val.uLongVal[i];  

Code Example 5-1 icSigNumTag and icSigListTag (Continued)

       printf("Tag # = %d, Tag Hex = 0x%x, Tag Ascii = %c%c%c%c\n", i,  
           attrPtr->val.uLongVal[i]; *tmp, *(tmp+1), *(tmp+2), *(tmp+3));  
  }  
  
  KcsFreeProfile(profile);  
  free (attrPtr);  

Required ICC Tags

Some tags in the profile structure are required by the default CMM. These tags provide the necessary data for the CMM to translate the color information.
The following ic* tag names are defined in the icc.h header file. The ic* data structures are defined starting on page 107 and are in the icc.h header file. See the ICC specification for more detailed definitions of device profiles, tag names and tag types (or data structures). ICC specification section titles are referenced in each profile class section below. (By default, the ICC specification is located online in the SUNWsdk/kcms/doc directory.)

Note - Lut8 and Lut16 tables are considered transforms by the KCMS framework and are not available as attributes.

The following tags are are required depending on the profile type and interpretation. The first five tags listed cannot be set using KcsGetAttribute() and KcsSetAttribute(). Instead they must be set with KcsUpdateProfile(). The grayTRCTags fully support reading and writing. They are required for input profiles only.
Tags Required Depending on Interpretation
ProfileTag NameInterpretation
Input ProfileAToB0TagNone
Display ProfileAToB0TagNone
Output ProfileBToA0TagPerceptual rendering
Output ProfileBToA1TagColorimetric rendering
Output ProfileBToA2TagSaturation rendering
Tags Required Depending on Interpretation
ProfileTag NameInterpretation
Input ProfilegrayTRCTagDepends on intent
Display ProfilegrayTRCTagAdditive
Output ProfilegrayTRCTagSubtractive

Input Profile

The following tags are for input devices such as scanners. See "Input File" in the ICC specification for more information.
Monochrome Input Profiles
Tag Name............Tag Type
icSigHeaderTag                      icHeader
icSigProfileDescriptionTag          icTextDescription
icSigGrayTRCTag                     icCurve
icSigMediaWhitePointTag             icXYZArray
icSigCopyrightTag                   icText

RGB Input Profiles
Tag Name............Tag Type
icSigHeaderTag                      icHeader
icSigProfileDescriptionTag          icTextDescription
icSigRedColorantTag                 icXYZArray
icSigGreeColorantTag                icXYZArray
icSigBlueColorantTag                icXYZArray
icSigRedTRCTag                      icCurve
icSigGreenTRCTag                    icCurve
icSigBlueTRCTag                     icCurve
icSigMediaWhitePointTag             icXYZArray
icSigCopyrightTag                   icText

CMYK Input Profiles
Tag Name..............Tag Type
icSigHeaderTag                         icHeader
icSigProfileDescriptionTag             icTextDescription
icSigMediaWhitePointTag                icXYZArray
icSigCopyrightTag                      icText

Output Profile

The following tags are required for output devices such as printers. See "Output Profile" in the ICC specification for more information.
Monochrome Output Profiles
Tag Name..............Tag Type
icSigHeaderTag                          icHeader
icSigProfileDescriptionTag              icTextDescription
icSigGrayTRCTag                         icCurve
icSigMediaWhitePointTag                 icXYZArray
icSigCopyrightTag                       icText

RGB and CMYK Output Profiles
Tag Name..............Tag Type
icSigHeaderTag                          icHeader
icSigProfileDescriptionTag              icTextDescription
icSigMediaWhitePointTag                 icXYZArray
icSigCopyrightTag                       icText

Device Link Profile

The device link profile is for a link or connection between devices. The following tags are for device link profiles. See "DeviceLink Profile" in the ICC specification for more information.
Tag Name..............Tag Type
icSigHeaderTag                          icHeader
icSigProfileDescriptionTag              icTextDescription
icSigProfileSequenceDescTag             icProfileSequenceDesc
icSigCopyrightTag                       icText

Color Space Conversion Profile

The color space conversion profile is for color space transformation between non-device color spaces and the profile connection space (PCS). The following tags are for color space conversion profiles. See "ColorSpaceConversion Profile" in the ICC specification for more information.
Tag Name..............Tag Type
icSigHeaderTag                          icHeader
icSigProfileDescriptionTag              icTextDescription
icSigMediaWhitePointTag                 icXYZArray
icSigCopyrightTag                       icText

Abstract Profile

The abstract profile is for color transformations between PCS and PCS. The following tags are for abstract profiles. See "Abstract Profile" in the ICC specification for more information.
Tag Name..............Tag Type
icSigHeaderTag                          icHeader
icSigProfileDescriptionTag              icTextDescription
icSigMediaWhitePointTag                 icXYZArray
icSigCopyrightTag                       icText

List of All Tags

Tag Name..............Tag Type
icSigHeaderTag                          icHeader
icSigBlueColorantTag                    icXYZArray
icSigBlueTRCTag                         icCurve
icSigCalibrationDateTimeTag             icSigDateTimeType
icSigCharTargetTag                      icText
icSigCopyrightTag                       icText
icSigDeviceMfgDescTag                   icTextDescription
icSigDeviceModelDescTag                 icTextDescription
icSigGrayTRCTag                         icCurve
icSigGreenColorantTag                   icXYZArray
icSigGreenTRCTag                        icCurve
icSigLuminanceTag                       icXYZArray
icSigMeasurementTag                     icMeasurement
icSigMediaBlackPointTag                 icXYZArray
icSigMediaWhitePointTag                 icXYZArray
icSigNamedColorTag                      icNamedColor
icSigProfileDescriptionTag              icTextDescription
icSigProfileSequenceDescTag             icProfileSequenceDesc
icSigPs2CRD0Tag                         icData
icSigPs2CRD1Tag                         icData
icSigPs2CRD2Tag                         icData
icSigPs2CRD3Tag                         icData
icSigPs2CSATag                          icData
icSigPs2RenderingIntentTag              icData
icSigRedColorantTag                     icXYZArray
icSigRedTRCTag                          icSigCurve
icSigScreeningDescTag                   icTextDescription
icSigScreeningTag                       icScreening
icSigTechnologyTag                      icSignature
icSigUcrBgTag                           icUcrBg
icSigViewingCondDescTag                 icTextDescription
icSigViewingConditionsTag               icViewingConditions

Tag Types

The following data structures are used only with tags (or attributes) and are defined in the icc.h header file. All other data structures in the KCMS framework API are defined in Chapter 3, "Data Structures" and in the
kcstypes.h header file.

Constants

#define icMagicNumber 0x61637370L /* 'acsp' */
#define icVersionNumber 0x02000000L /* 2.0, BCD */

Screen Encodings

#define icPrtrDefaultScreensFalse 0x00000000L /* Bit position 0 */
#define icPrtrDefaultScreensTrue 0x00000001L /* Bit position 0 */
#define icLinesPerInch                  0x00000002L /* Bit position 1 */
#define icLinesPerCm                    0x00000000L /* Bit position 1 */

Device Attributes

The defined values correspond to the low four bytes of the eight-byte attribute quantity; see icc.h for their location.
#define icReflective                    0x00000000L /* Bit position 0 */
#define icTransparency                  0x00000001L /* Bit position 0 */
#define icGlossy                        0x00000000L /* Bit position 1 */
#define icMatte                         0x00000002L /* Bit position 1 */

Profile Header Flags

The low 16 bits are reserved for the ICC.
#define icEmbeddedProfileFalse          0x00000000L /* Bit position 0 */
#define icEmbeddedProfileTrue           0x00000001L /* Bit position 0 */
#define icUseAnywhere                   0x00000000L /* Bit position 1 */
#define icUseWithEmbeddedDataOnly 0x00000002L /* Bit position 1 */

ASCII or Binary Data

#define icAsciiData                     0x00000000L /* Used in dataType */
#define icBinaryData                    0x00000001L

Variable-Length Array

#define icAny                           1

Signatures

Signatures are 4-byte identifiers used to translate platform definitions to ic* form and to differentiate between tags and other items in the profile format. Set icSignature as appropriate for your operating system.
icSignature This icSignature is for the Solaris operating system. Note the number definitions.

  #if defined(sun) || defined(__sun)  
  typedef long icSignature;  
  
  /* Number Definitions */  
  
  /* Unsigned Integer Numbers */  
  typedef unsigned char icUInt8Number;  
  typedef unsigned short icUInt16Number;  
  typedef unsigned long icUInt32Number;  
  typedef unsigned long icUInt64Number[2];  
  
  /* Signed Integer Numbers */  
  typedef char              icInt8Number;  
  typedef short             icInt16Number;  
  typedef long              icInt32Number;  
  typedef long              icInt64Number[2];  
  
  /* Fixed Numbers */  
  typedef long              icS15Fixed16Number;  
  typedef unsigned long          icU16Fixed16Number;  
  #endif /* 32-bit Solaris, SunOS */  

icTagSignature


  typedef enum {  
       icSigAToB0Tag         = 0x41324230L,/* 'A2B0' */  
       icSigAToB1Tag         = 0x41324231L,/* 'A2B1' */  
       icSigAToB2Tag         = 0x41324232L,/* 'A2B2' */  
       icSigBlueColorantTag      = 0x6258595AL,/* 'bXYZ' */  
       icSigBlueTRCTag       = 0x62545243L,/* 'bTRC' */  
       icSigBToA0Tag         = 0x42324130L,/* 'B2A0' */  
       icSigBToA1Tag         = 0x42324131L,/* 'B2A1' */  
       icSigBToA2Tag         = 0x42324132L,/* 'B2A2' */  
       icSigCalibrationDateTimeTag        = 0x63616C74L,/* 'calt' */  
       icSigCharTargetTag        = 0x74617267L,/* 'targ' */  
       icSigCopyrightTag         = 0x63707274L,/* 'cprt' */  
       icSigDeviceMfgDescTag = 0x646D6E64L,/* 'dmnd' */  
       icSigDeviceModelDescTag        = 0x646D6464L,/* 'dmdd' */  
       icSigGamutTag             = 0x676d7420L,/* 'gmt ' */  
       icSigGrayTRCTag           = 0x6b545243L,/* 'kTRC' */  
       icSigGreenColorantTag = 0x6758595AL,/* 'gXYZ' */  
       icSigGreenTRCTag          = 0x67545243L,/* 'gTRC' */  
       icSigLuminanceTag         = 0x6C756d69L,/* 'lumi' */  
       icSigMeasurementTag       = 0x6D656173L,/* 'meas' */  
       icSigMediaBlackPointTag        = 0x626B7074L,/* 'bkpt' */  
       icSigMediaWhitePointTag        = 0x77747074L,/* 'wtpt' */  
       icSigNamedColorTag        = 0x6E636f6CL,/* 'ncol' */  
       icSigPreview0Tag          = 0x70726530L,/* 'pre0' */  
       icSigPreview1Tag          = 0x70726531L,/* 'pre1' */  
       icSigPreview2Tag          = 0x70726532L,/* 'pre2' */  
       icSigProfileDescriptionTag         = 0x64657363L,/* 'desc' */  
       icSigProfileSequenceDescTag        = 0x70736571L,/* 'pseq' */  
       icSigPs2CRD0Tag       = 0x70736430L,/* 'psd0' */  
       icSigPs2CRD1Tag       = 0x70736431L,/* 'psd1' */  
       icSigPs2CRD2Tag       = 0x70736432L,/* 'psd2' */  
       icSigPs2CRD3Tag       = 0x70736433L,/* 'psd3' */  
       icSigPs2CSATag        = 0x70733273L,/* 'ps2s' */  


       icSigPs2RenderingIntentTag         = 0x70733269L,/* 'ps2i' */  
       icSigRedColorantTag                = 0x7258595AL,/* 'rXYZ' */  
       icSigRedTRCTag                     = 0x72545243L,/* 'rTRC' */  
       icSigScreeningDescTag              = 0x73637264L,/* 'scrd' */  
       icSigScreeningTag                  = 0x7363726EL,/* 'scrn' */  
       icSigTechnologyTag                 = 0x74656368L,/* 'tech' */  
       icSigUcrBgTag                      = 0x62666420L,/* 'bfd ' */  
       icSigViewingCondDescTag            = 0x76756564L,/* 'vued' */  
       icSigViewingConditionsTag = 0x76696577L,/* 'view' */  
       icMaxEnumTag              = 0xFFFFFFFFL/* enum = 4 bytes max */  
  } icTagSignature;  

icTechnologySignature


  typedef enum {  
       icSigFilmScanner          = 0x6673636EL,        /* 'fscn' */  
       icSigReflectiveScanner = 0x7273636EL,           /* 'rscn' */  
       icSigInkJetPrinter        = 0x696A6574L,        /* 'ijet' */  
       icSigThermalWaxPrinter = 0x74776178L,           /* 'twax' */  
       icSigElectrophotographicPrinter= 0x6570686FL,            /* 'epho' */  
       icSigElectrostaticPrinter          = 0x65737461L,        /* 'esta' */  
       icSigDyeSublimationPrinter         = 0x64737562L,        /* 'dsub' */  
       icSigPhotographicPaperPrinter = 0x7270686FL,             /* 'rpho' */  
       icSigFilmWriter           = 0x6670726EL,        /* 'fprn' */  
       icSigVideoMonitor         = 0x7669646DL,        /* 'vidm' */  
       icSigVideoCamera          = 0x76696463L,        /* 'vidc' */  
       icSigProjectionTelevision          = 0x706A7476L,        /* 'pjtv' */  
       icSigCRTDisplay           = 0x43525420L,        /* 'CRT ' */  
       icSigPMDisplay            = 0x504D4420L,        /* 'PMD ' */  
       icSigAMDisplay            = 0x414D4420L,        /* 'AMD ' */  
       icSigPhotoCD              = 0x4B504344L,        /* 'KPCD' */  
       icSigPhotoImageSetter = 0x696D6773L,            /* 'imgs' */  
       icSigGravure              = 0x67726176L,        /* 'grav' */  
       icSigOffsetLithography = 0x6F666673L,           /* 'offs' */  
       icSigSilkscreen           = 0x73696C6BL,        /* 'silk' */  
       icSigFlexography          = 0x666C6578L,        /* 'flex' */  
       icMaxEnumTechnology       = 0xFFFFFFFFL/* enum = 4 bytes max */  
  } icTechnologySignature;  

icTagTypeSignature


  typedef enum {  
       icSigCurveType            = 0x63757276L,/* 'curv' */  
       icSigDataType             = 0x64617461L,/* 'data' */  
       icSigDateTimeType         = 0x6474696DL,/* 'dtim' */  
       icSigLut16Type            = 0x6d667432L,/* 'mft2' */  
       icSigLut8Type             = 0x6d667431L,/* 'mft1' */  
       icSigMeasurementType      = 0x6D656173L,/* 'meas' */  
       icSigNamedColorType       = 0x6E636f6CL,/* 'ncol' */  
       icSigProfileSequenceDescType= 0x70736571L,/* 'pseq' */  
       icSigS15Fixed16ArrayType       = 0x73663332L,/* 'sf32' */  
       icSigScreeningType        = 0x7363726EL,/* 'scrn' */  
       icSigSignatureType        = 0x73696720L,/* 'sig ' */  
       icSigTextType             = 0x74657874L,/* 'text' */  
       icSigTextDescriptionType       = 0x64657363L,/* 'desc' */  
       icSigU16Fixed16ArrayType       = 0x75663332L,/* 'uf32' */  
       icSigUcrBgType            = 0x62666420L,/* 'bfd ' */  
       icSigUInt16ArrayType      = 0x75693136L,/* 'ui16' */  
       icSigUInt32ArrayType      = 0x75693332L,/* 'ui32' */  
       icSigUInt64ArrayType      = 0x75693634L,/* 'ui64' */  
       icSigUInt8ArrayType       = 0x75693038L,/* 'ui08' */  
       icSigViewingConditionsType= 0x76696577L,/* 'view' */  
       icSigXYZType              = 0x58595A20L,/* 'XYZ ' */  
       icSigXYZArrayType         = 0x58595A20L,/* 'XYZ ' */  
       icMaxEnumType             = 0xFFFFFFFFL/* enum = 4 bytes max */  
  } icTagTypeSignature;  

Color Space Signature

icColorSpaceSignature
icColorSpaceSignature is used in the icHeader structure.


  typedef enum {  
       icSigXYZData     = 0x58595A20L,/* 'XYZ ' */  
       icSigLabData     = 0x4C616220L,/* 'Lab ' */  
       icSigLuvData     = 0x4C757620L,/* 'Luv ' */  
       icSigYCbCrData = 0x59436272L,/* 'YCbr' */  
       icSigYxyData     = 0x59787920L,/* 'Yxy ' */  
       icSigRgbData     = 0x52474220L,/* 'RGB ' */  
       icSigGrayData    = 0x47524159L,/* 'GRAY' */  
       icSigHsvData     = 0x48535620L,/* 'HSV ' */  
       icSigHlsData     = 0x484C5320L,/* 'HLS ' */  
       icSigCmykData    = 0x434D594BL,/* 'CMYK' */  
       icSigCmyData     = 0x434D5920L,/* 'CMY ' */  
       icMaxEnumData    = 0xFFFFFFFFL/* enum = 4 bytes max */  
  } icColorSpaceSignature;  


Note - Currently, only icSigXYZData and icSigLabData are valid profile connection spaces (PCSs).

icProfileClassSignature
icProfileClassSignature is used in the icHeader structure.


  /* profileClass enumerations */  
  typedef enum {  
       icSigInputClass       = 0x73636E72L,/* 'scnr' */  
       icSigDisplayClass = 0x6D6E7472L,/* 'mntr' */  
       icSigOutputClass      = 0x70727472L,/* 'prtr' */  
       icSigLinkClass        = 0x6C696E6BL,/* 'link' */  
       icSigAbstractClass = 0x61627374L,/* 'abst' */  
       icSigColorSpaceClass      = 0x73706163L,/* 'spac' */  
       icMaxEnumClass        = 0xFFFFFFFFL/* enum = 4 bytes max */  
  } icProfileClassSignature;  

icPlatformSignature
icPlatformSignature is used in the icHeader structure.


  /* Platform Signatures */  
  typedef enum {  
       icSigMacintosh        = 0x4150504CL,/* 'APPL' */  
       icSigMicrosoft        = 0x4D534654L,/* 'MSFT' */  
       icSigSolaris          = 0x53554E57L,/* 'SUNW' */  
       icSigSGI              = 0x53474920L,/* 'SGI ' */  
       icSigTaligent         = 0x54474E54L,/* 'TGNT' */  
       icMaxEnumPlatform = 0xFFFFFFFFL/* enum = 4 bytes max */  
  } icPlatformSignature;  

Other Enums

icMeasurementFlare
icMeasurementFlare is used in the icMeasurement structure.


  /* Measurement Flare, used in the measurmentType tag */  
  typedef enum {  
       icFlare0         = 0x00000000L,         /* 0% flare */  
       icFlare100       = 0x00000001L,         /* 100% flare */  
       icMaxFlare       = 0xFFFFFFFFL          /* enum = 4 bytes max */  
  } icMeasurementFlare;  

icMeasurementGeometry

icMeasurementGeometry is used in the icMeasurement structure.

  /* Measurement Geometry, used in the measurmentType tag */  
  typedef enum {  
       icGeometryUnknown         = 0x00000000L,/* Unknown geometry */  
       icGeometry045or450        = 0x00000001L,/* 0/45 or 45/0 */  
       icGeometry0dord0          = 0x00000002L,/* 0/d or d/0 */  
       icMaxGeometry             = 0xFFFFFFFFL/* enum = 4 bytes max */  
  } icMeasurementGeometry;  

icRenderingIntent
icRenderingIntent is used in the icHeader structure.


  /* Rendering Intents, used in the profile header */  
  typedef enum {  
       icPerceptual              = 0,  
       icRelativeColorimetric = 1,  
       icSaturation              = 2,  
       icAbsoluteColorimetric = 3,  
       icMaxEnumIntent           = 0xFFFFFFFFL/* enum = 4 bytes max */  
  } icRenderingIntent;  

icSpotShape
icSpotShape is used in the icScreening structure.


  /* Different Spot Shapes currently defined, used for  
  screeningType */  
  typedef enum {  
       icSpotShapeUnknown             = 0,  
       icSpotShapePrinterDefault = 1,  
       icSpotShapeRound               = 2,  
       icSpotShapeDiamond             = 3,  
       icSpotShapeEllipse             = 4,  
       icSpotShapeLine                = 5,  
       icSpotShapeSquare              = 6,  
       icSpotShapeCross               = 7,  
       icMaxEnumSpot             = 0xFFFFFFFFL/* enum = 4 bytes max */  
  } icSpotShape;  

icStandardObserver

icStandardObserver is used in the Measurement structure.

  /* Standard Observer, used in the measurementType tag */  
  typedef enum {  
      icStdObsUnknown            = 0x00000000L, /* Unknown observer */  
      icStdObs1931TwoDegrees= 0x00000001L, /* 1931 two degrees */  
      icStdObs1964TenDegrees= 0x00000002L, /* 1961 ten degrees */  
      icMaxStdObs                = 0xFFFFFFFFL/* enum = 4 bytes max */  
  } icStandardObserver;  

icIlluminant

icIlluminant is used in the icMeasurement structure.

  /* Pre-defined illuminants, used in measurement and viewing  
   * conditions type */  
  typedef enum {  
       icIlluminantUnknown       = 0x00000000L,  
       icIlluminantD50           = 0x00000001L,  
       icIlluminantD65           = 0x00000002L,  
       icIlluminantD93           = 0x00000003L,  
       icIlluminantF2            = 0x00000004L,  
       icIlluminantD55           = 0x00000005L,  
       icIlluminantA             = 0x00000006L,  
       icIlluminantEquiPowerE= 0x00000007L,/* Equi-Power (E) */  
       icIlluminantF8            = 0x00000008L,  
       icMaxEnumIluminant        = 0xFFFFFFFFL/* enum = 4 bytes max */  
  } icIlluminant;  

Arrays of Numbers

These arrays are variable in length and type. They are implemented with the icAny constant instead of pointers. The icAny constant is a single-byte array that allows you to extend the data structure by allocating more data.

icInt8Number


  typedef struct {  
       icInt8Number     data[icAny];  
  } icInt8Array;  

icUInt8Number


  typedef struct {  
       icUInt8Number    data[icAny];  
  } icUInt8Array;  

icUInt16Number


  typedef struct {  
       icUInt16Number        data[icAny];  
  } icUInt16Array;  

icInt16Array


  typedef struct {  
       icInt16Number    data[icAny];  
  } icInt16Array;  

icUInt32Number


  typedef struct {  
       icUInt32Number        data[icAny];  
  } icUInt32Array;  

icInt32Array


  typedef struct {  
       icInt32Number    data[icAny];  
  } icInt32Array;  

icUInt64Number


  typedef struct {  
       icUInt64Number        data[icAny];  
  } icUInt64Array;  

icInt64Number


  typedef struct {  
       icInt64Number    data[icAny];  
  } icInt64Array;  

icU16Fixed16Number


  typedef struct {  
       icU16Fixed16Number data[icAny];  
  } icU16Fixed16Array;  

icS15Fixed16Number


  typedef struct {  
       icS15Fixed16Number data[icAny];  
  } icS15Fixed16Array;  

icDateTimeNumber


  /* The base date time number */  
  typedef struct {  
      icUInt16Number        year;  
      icUInt16Number        month;  
      icUInt16Number        day;  
      icUInt16Number        hours;  
      icUInt16Number        minutes;  
      icUInt16Number        seconds;  
  } icDateTimeNumber;  

icXYZNumber


  typedef struct {  
      icS15Fixed16Number         X;  
      icS15Fixed16Number         Y;  
      icS15Fixed16Number         Z;  
  } icXYZNumber;  

icXYZArray


  typedef struct {  
       icXYZNumberdata[icAny]; /* Variable array of XYZ numbers */  
  } icXYZArray;  

icCurve


  typedef struct {  
       icUInt32Numbercount;           /* Number of entries */  
       icUInt16Numberdata[icAny];/* The actual table data, real  
                                       * number is determined by count.  
                                       * Interpretation depends on data  
                                       * use and tag. */  
  } icCurve;  

icData


  typedef struct {  
       icUInt32Number dataFlag;       /* 0 = ascii, 1 = binary */  
       icInt8Number     data[icAny];/*Data,size determined from tag */  
  } icData;  


Note - Lut8 (icLut8) and Lut16 (icLut16) tables are considered transforms by the KCMS framework and are not available as attributes.

icMeasurement


  typedef struct {  
       icStandardObserver        stdObserver;/* Standard observer */  
       icXYZNumber               backing;      /* XYZ for backing material */  
       icMeasurementGeometry geometry;         /* Measurement geometry */  
       icMeasurementFlare        flare;        /* Measurement flare */  
       icIlluminant              illuminant;/* Illuminant */  
  } icMeasurement;  

icDescStruct


  typedef struct {  
       icSignature           deviceMfg;        /* Device Manufacturer */  
       icSignature           deviceModel;      /* Decvice Model */  
       icUInt64Number        attributes;       /* Device attributes */  
       icTechnologySignature technology;/* Technology signature */  
       icInt8Number     data[icAny];      /* Descriptions text follows */  
  
  /*  Data that follows is of this form, this is an icInt8Number  
   *  to avoid problems with a compiler generating  bad code as  
   *  these arrays are variable in length.  
   * icTextDescription      deviceMfgDesc; * Manufacturer text  
   * icTextDescription      modelDesc;        * Model text */  
  
  } icDescStruct;  

icProfileSequenceDesc


  typedef struct {  
       icUInt32Number count;          /* Number of descriptions */  
       icUInt8Number    data[icAny];/* Array of description struct */  
  } icProfileSequenceDesc;  

icTextDescription


  typedef struct {  
       icUInt32Number count;              /* Description length */  
       icInt8Number     data[icAny];      /* Descriptions follow */  
  
  /* Data that follows is of this form  
   * icInt8Number       desc[count]       * NULL terminated ascii string  
   * icUInt32Number ucLangCode;           * UniCode language code  
   * icUInt32Number ucCount;              * UniCode description length  
   * icInt16Number      ucDesc[ucCount];* The UniCode description  
   * icUInt16Number scCode;               * ScriptCode code  
   * icUInt8Number      scCount;          * ScriptCode count  
   * icInt8Number       scDesc[67];       * ScriptCode Description */  
  
  } icTextDescription;  

icScreeningData


  typedef struct {  
       icS15Fixed16Number        frequency; /* Frequency */  
       icS15Fixed16Number        angle;        /* Screen angle */  
       icSpotShape               spotShape; /* Spot Shape encodings */  
  } icScreeningData;  

icScreening


  typedef struct {  
       icUInt32Number            screeningFlag; /* Screening flag */  
       icUInt32Number            channels;         /* Number of channels */  
       icScreeningData           data[icAny];      /* Array of screening data  
  */  
  } icScreening;  

icText


  typedef struct {  
       icInt8Numberdata[icAny];/* Variable array of chars */  
  } icText;  

icUcrBgCurve


  /* Structure describing either a UCR or BG curve */  
  typedef struct {  
      icUInt32Number        count;            /* Curve length */  
      icUInt16Number        curve[icAny];/* The array of curve values */  
  } icUcrBgCurve;  

icUcrBg


  /* Under color removal, black generation */  
  typedef struct {  
      icInt8Number      data[icAny];/* The Ucr BG data */  
  /* Data that follows is of this form. icUcrBg is an icInt8Number  
   * for a compiler and variable-length arrays.  
   * icUcrBgCurve       ucr;     * Ucr curve  
   * icUcrBgCurve       bg;      * Bg curve  
   * icInt8Number string[]; * Description string */  
  } icUcrBg;  

icViewingCondition


  typedef struct {  
       icXYZNumber      illuminant;/* In candelas per metre sq'd */  
       icXYZNumber      surround;     /* In candelas per metre sq'd */  
       icIlluminant     stdIluminant;/* See icIlluminant defines */  
  } icViewingCondition;  

Tag Type Definitions

The following tag type definitions are in the icc.h header file.

icTagBase


  typedef struct {  
       icTagTypeSignature sig;                 /* Signature */  
       icInt8Number          reserved[4];      /* Reserved, set to 0 */  
  } icTagBase;  

icCurveType


  typedef struct {  
       icTagBase        base;             /* "curv" signature */  
       icCurve          curve;            /* curve data */  
  } icCurveType;  

icDataType


  typedef struct {  
       icTagBase        base;             /* "data" signature */  
       icData           data;             /* data structure */  
  } icDataType;  

icDateTimeType


  typedef struct {  
       icTagBase        base;             /* "dtim" signature */  
       icData           data;             /* date */  
  } icDateTimeType;  

icLut16Type


  typedef struct {  
       icTagBase        base;             /* "mft2" signature */  
       icLut16          lut;              /* Lut16 data*/  
  } icLut16Type;  


Note - Lut16 (icLut16) tables are considered transforms by the KCMS framework and are not available as attributes. You cannot use this with KcsGetAttribute() and KcsSetAttribute().

icLut8Type


  typedef struct {  
       icTagBase        base;             /* "mft1" signature */  
       icLut8           lut;              /* Lut8 data*/  
  } icLut8Type;  


Note - Lut8 (icLut8) tables are considered transforms by the KCMS framework and are not available as attributes. You cannot use this with KcsGetAttribute() and KcsSetAttribute().

icMeasurementType


  typedef struct {  
       icTagBase        base;             /* "meas" signature */  
       icMeasurement    measurement;      /* measurement data*/  
  } icMeasurementType;  

icNamedColorType


  typedef struct {  
       icTagBase        base;             /* "ncol" signature */  
       icNamedColor     ncolor;           /* named color data*/  
  } icNamedColorType;  

icProfileSequenceType


  typedef struct {  
       icTagBase        base;             /* "pseq" signature */  
       icProfileSequence desc;            /* seq description data*/  
  } icProfileSequenceType;  

icTextDescriptionType


  typedef struct {  
       icTagBase        base;             /* "desc" signature */  
       icTextDescription desc;            /* description data*/  
  } icTextDescriptionType;  

icS15Fixed16ArrayType


  typedef struct {  
       icTagBase             base;        /* "sf32" signature */  
       icS15Fixed16Array data;            /* array of values */  
  } icS15Fixed16ArrayType;  

icScreeningType


  typedef struct {  
       icTagBase        base;         /* "scrn" signature */  
       icScreening      screen;       /* screening structure */  
  } icScreeningType;  

icSignatureType


  typedef struct {  
       icTagBase        base;         /* "sig" signature */  
       icSignature      signature; /* signature data */  
  } icSignatureType;  

icTextType


  typedef struct {  
       icTagBase        base;             /* "text" signature */  
       icText           data;         /* variable array of chars */  
  } icTextType;  

icU16Fixed16ArrayType


  typedef struct {  
       icTagBase             base;        /* "uf32" signature */  
       icU16Fixed16Array data;            /* variable array of values */  
  } icU16Fixed16ArrayType;  

icUcrBgType


  typedef struct {  
       icTagBase             base;        /* "bfd" signature */  
       icUcrBg               data;        /* ucrBg structure*/  
  } icUcrBgType;  

icUInt16ArrayType


  typedef struct {  
       icTagBase             base;        /* "ui16" signature */  
       icUInt16Array         data;        /* variable array of values */  
  } icUInt16ArrayType;  

icUInt32ArrayType


  typedef struct {  
       icTagBase             base;        /* "ui32" signature */  
       icUInt32Array         data;        /* variable array of values */  
  } icUInt32ArrayType;  

icUInt64ArrayType


  typedef struct {  
       icTagBase             base;        /* "ui64" signature */  
       icUInt64Array         data;        /* variable array of values */  
  } icUInt64ArrayType;  

icUInt8ArrayType


  typedef struct {  
       icTagBase             base;        /* "ui08" signature */  
       icUInt8Array          data;        /* variable array of values */  
  } icUInt8ArrayType;  

icViewingConditionType


  typedef struct {  
       icTagBase             base;        /* "view" signature */  
       icViewingCondition view;           /* viewing conditions*/  
  } icViewingConditionType;  

icXYZType


  typedef struct {  
       icTagBase             base;    /* "XYZ" signature */  
       icXYZArray            data;    /* variable array of XYZ numbers */  
  } icXYZType;  

KCMS-Specific Tag Definitions

The following definitions are KCMS-specific and in the icc.h. These definitions are registered with the ICC.

icTag


  typedef struct {  
       icTagSignature sig;       /* tag signature */  
       icUInt32Number offset; /* start of tag relative to start of  
                                  * header, See ICC spec, sect 8 */  
       icUInt32Number size;      /* size in bytes */  
  } icTag;  

icTagList


  typedef struct {  
       icUInt32Number count;              /* number of tags in profile */  
       icTag            tags[icAny];      /* variable array of tags */  
  } icTagList;  

icHeader


  typedef struct {  
       icUInt32Number                 size;        /* Profile size in bytes */  
       icSignature                    cmmId;       /* CMM for this profile */  
       icUInt32Number                 version;     /* Format version number */  
       icProfileClassSignature        deviceClass;/* Type of profile */  
       icColorSpaceSignature          colorSpace;/* Color space of data*/  
       icColorSpaceSignature          pcs;         /* PCS, XYZ or Lab only */  
       icDateTimeNumber               date;        /* Date profile was created */  
       icSignature                    magic;       /* icMagicNumber */  
       icPlatformSignature            platform;    /* Primary Platform */  
       icUInt32Number                 flags;       /* Various bit settings */  
       icSignature                    manufacturer;    /* Device manufacturer */  
       icUInt32Number                 model;       /* Device model number */  
       icUInt64Number                 attributes;/* Device attributes */  
       icUInt32Number                 renderingIntent;      /* Rendering intent */  
       icXYZNumber                    illuminant;/* Profile illuminant */  
       icInt8Number                   reserved[48];         /* Reserved for future */  
  } icHeader;  

icProfile


  typedef struct {  
       icHeader         header;       /* header */  
       icUInt32Number count; /* number of tags in profile */  
       icInt8Number     data[icAny];/* tagTable and tagData */  
  
  /* Data the follows is of this form:  
   * icTag              tagTable[icAny];      * tag table  
   * icInt8Number       tagData[icAny];       * tag data  
   */  
  
  } icProfile;