KCMS Application Developer's Guide

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;

icInt16Number

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

icUInt16Number

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

icInt32Number

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

icUInt32Number

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

icInt64Number

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

icUInt64Number

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

icS15Fixed16Number

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

icU16Fixed16Number

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

icCrdInfo

typedef struct {
 	icUInt32Number				count;				/* Char count includes NULL */
 	icInt8Number				desc[icAny];				/* NULL terminated string */
 } icCrdInfo;

icCurve

typedef struct {
 	icUInt32Number					count;				/* Number of entries */
 	icUInt16Number					data[icAny];				/* The actual table data, real
 										* number is determined by count
 										* Interpretation depends on data
 										* use with a given tag */
 } icCurve;

icData

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

icDateTimeNumber

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

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;

icLut8

/* lut8, input & output tables are always 256 bytes in length */
 typedef struct {
     icUInt8Number	inputChan;	/* Number of input channels */
     icUInt8Number	outputChan;	/* Number of output channels */
     icUInt8Number	clutPoints;	/* Number of clutTable grid points */
     icInt8Number	pad;
     icS15Fixed16Number	e00;		/* e00 in the 3 * 3 */
     icS15Fixed16Number	e01;		/* e01 in the 3 * 3 */   
     icS15Fixed16Number	e02;		/* e02 in the 3 * 3 */
     icS15Fixed16Number	e10;		/* e10 in the 3 * 3 */
     icS15Fixed16Number	e11;		/* e11 in the 3 * 3 */   
     icS15Fixed16Number	e12;		/* e12 in the 3 * 3 */
     icS15Fixed16Number	e20;		/* e20 in the 3 * 3 */
     icS15Fixed16Number	e21;		/* e21 in the 3 * 3 */   
     icS15Fixed16Number	e22;		/* e22 in the 3 * 3 */
     icUInt8Number	data[icAny];	/* Data follows see spec for size */
 /*
  *  Data that follows is of this form
  *
  *  icUInt8Number	inputTable[inputChan][256];	* The input table
  *  icUInt8Number	clutTable[icAny];		* The clut table
  *  icUInt8Number	outputTable[outputChan][256];	* The output table
  */
 } icLut8;

icLut16

/* lut16 */
 typedef struct {
     icUInt8Number	inputChan;	/* Number of input channels */
     icUInt8Number	outputChan;	/* Number of output channels */
     icUInt8Number	clutPoints;	/* Number of clutTable grid points */
     icInt8Number	pad;		/* Padding for byte alignment */
     icS15Fixed16Number	e00;		/* e00 in the 3 * 3 */
     icS15Fixed16Number	e01;		/* e01 in the 3 * 3 */   
     icS15Fixed16Number	e02;		/* e02 in the 3 * 3 */
     icS15Fixed16Number	e10;		/* e10 in the 3 * 3 */
     icS15Fixed16Number	e11;		/* e11 in the 3 * 3 */   
     icS15Fixed16Number	e12;		/* e12 in the 3 * 3 */
     icS15Fixed16Number	e20;		/* e20 in the 3 * 3 */
     icS15Fixed16Number	e21;		/* e21 in the 3 * 3 */   
     icS15Fixed16Number	e22;		/* e22 in the 3 * 3 */
     icUInt16Number	inputEnt;	/* Number of input table entries */
     icUInt16Number	outputEnt;	/* Number of output table entries */
     icUInt16Number	data[icAny];	/* Data follows see spec for size */
 /*
  *  Data that follows is of this form
  *
  *  icUInt16Number	inputTable[inputChan][icAny];	* The input table
  *  icUInt16Number	clutTable[icAny];		* The clut table
  *  icUInt16Number	outputTable[outputChan][icAny];	* The output table
  */
 } icLut16;

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;

Each field in icMeasurement is an enumerated type. For details on each field, see the following:

icNamedColor2

/*
  * icNamedColor2 takes the place of icNamedColor, approved at the
  * SIGGRAPH 95, ICC meeting.
  */
 typedef struct {
     icUInt32Number									vendorFlag;									/* Bottom 16 bits for IC use */
     icUInt32Number									count;										/* Count of named colors */
     icUInt32Number									nDeviceCoords;										/* Number of device coordinates */
     icInt8Number									prefix[32];										/* Prefix for each color name */
     icInt8Number									suffix[32];										/* Suffix for each color name */
     icInt8Number									data[icAny];										/* Named color data follows */
 /*
  *  Data that follows is of this form
  *
  * icInt8Number									root1[32];									* Root name for first color
  * icUInt16Number									pcsCoords1[icAny];									* PCS coordinates of first color
  * icUInt16Number									deviceCoords1[icAny];									* Device coordinates of first color
  * icInt8Number									root2[32];									* Root name for second color
  * icUInt16Number									pcsCoords2[icAny];									* PCS coordinates of first color
  * icUInt16Number									deviceCoords2[icAny];									* Device coordinates of first color
  *									:
  *									:
  * Repeat for name and PCS and device color coordinates up to (count-1)
  *
  * NOTES: 
  * PCS and device space can be determined from the header.
  *
  * PCS coordinates are icUInt16 numbers and are described in the ICC
  * specification. Only 16 bit CIELAB and CIEXYZ are allowed. The number of
  * coordinates is consistent with the headers PCS.
  *
  * Device coordinates are icUInt16 numbers where 0x0000 represents
  * the minimum value and 0xFFFF represents the maximum value.
  * If the nDeviceCoords value is 0, this field is not given.
  */
 } icNamedColor2;

icProfileSequenceDesc

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

icScreening

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

icScreeningData

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

icText

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

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;

icUcrBg

typedef struct {
     icInt8Number								data[icAny];						/* The Ucr BG data */
 /*
  *  Data that follows is of this form. UcrBg is a icInt8Number
  *  to avoid problems with a compiler as
  *  these are variable-length arrays.
  *
  * icUcrBgCurve								ucr;				* Ucr curve
  * icUcrBgCurve								bg;				* Bg curve
  * icInt8Number								string;				* UcrBg description string
  */
 } icUcrBg;

icUcrBgCurve

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

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;

icXYZArray

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

icXYZNumber

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