view dstep/applicationservices/colorsync/CMICCProfile.d @ 12:9f0b49a2f64e

Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
author Jacob Carlborg <doob@me.com>
date Mon, 03 Aug 2009 14:00:21 +0200
parents
children
line wrap: on
line source

/**
 * Copyright: Copyright (c) 2009 Jacob Carlborg.
 * Authors: Jacob Carlborg
 * Version: Initial created: Aug 1, 2009 
 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
 */
module dstep.applicationservices.colorsync.CMICCProfile;

//import dstep.AvailabilityMacros;
import dstep.applicationservices.colorsync.CMBase;
import dstep.coreservices.CoreServices;
import dstep.objc.bridge.TypeEncoding;

alias ushort CMXYZComponent;
alias ubyte[16] CMProfileMD5;
alias CMProfileMD5* CMProfileMD5Ptr;
alias uint CMMatchOption;
alias uint CMMatchFlag;

// This is needed otherwise the enums will fail compiling with gdc
version (GNU)
{
	private
	{
		const __cmMagicNumber = getOSType!("acsp");
		const __cmAToB0Tag = getOSType!("A2B0");
		const __cmAToB1Tag = getOSType!("A2B1");
		const __cmAToB2Tag = getOSType!("A2B2");
		const __cmBlueColorantTag = getOSType!("bXYZ");
		const __cmBlueTRCTag = getOSType!("bTRC");
		const __cmBToA0Tag = getOSType!("B2A0");
		const __cmBToA1Tag = getOSType!("B2A1");
		const __cmBToA2Tag = getOSType!("B2A2");
		const __cmCalibrationDateTimeTag = getOSType!("calt");
		const __cmChromaticAdaptationTag = getOSType!("chad");
		const __cmCharTargetTag = getOSType!("targ");
		const __cmCopyrightTag = getOSType!("cprt");
		const __cmDeviceMfgDescTag = getOSType!("dmnd");
		const __cmDeviceModelDescTag = getOSType!("dmdd");
		const __cmGamutTag = getOSType!("gamt");
		const __cmGrayTRCTag = getOSType!("kTRC");
		const __cmGreenColorantTag = getOSType!("gXYZ");
		const __cmGreenTRCTag = getOSType!("gTRC");
		const __cmLuminanceTag = getOSType!("lumi");
		const __cmMeasurementTag = getOSType!("meas");
		const __cmMediaBlackPointTag = getOSType!("bkpt");
		const __cmMediaWhitePointTag = getOSType!("wtpt");
		const __cmNamedColorTag = getOSType!("ncol");
		const __cmNamedColor2Tag = getOSType!("ncl2");
		const __cmPreview0Tag = getOSType!("pre0");
		const __cmPreview1Tag = getOSType!("pre1");
		const __cmPreview2Tag = getOSType!("pre2");
		const __cmProfileDescriptionTag = getOSType!("desc");
		const __cmProfileSequenceDescTag = getOSType!("pseq");
		const __cmPS2CRD0Tag = getOSType!("psd0");
		const __cmPS2CRD1Tag = getOSType!("psd1");
		const __cmPS2CRD2Tag = getOSType!("psd2");
		const __cmPS2CRD3Tag = getOSType!("psd3");
		const __cmPS2CSATag = getOSType!("ps2s");
		const __cmPS2RenderingIntentTag = getOSType!("ps2i");
		const __cmRedColorantTag = getOSType!("rXYZ");
		const __cmRedTRCTag = getOSType!("rTRC");
		const __cmScreeningDescTag = getOSType!("scrd");
		const __cmScreeningTag = getOSType!("scrn");
		const __cmTechnologyTag = getOSType!("tech");
		const __cmUcrBgTag = getOSType!("bfd ");
		const __cmViewingConditionsDescTag = getOSType!("vued");
		const __cmViewingConditionsTag = getOSType!("view");
		const __cmPS2CRDVMSizeTag = getOSType!("psvm");
		const __cmVideoCardGammaTag = getOSType!("vcgt");
		const __cmMakeAndModelTag = getOSType!("mmod");
		const __cmProfileDescriptionMLTag = getOSType!("dscm");
		const __cmNativeDisplayInfoTag = getOSType!("ndin");
		const __cmSigCrdInfoType = getOSType!("crdi");
		const __cmSigCurveType = getOSType!("curv");
		const __cmSigDataType = getOSType!("data");
		const __cmSigDateTimeType = getOSType!("dtim");
		const __cmSigLut16Type = getOSType!("mft2");
		const __cmSigLut8Type = getOSType!("mft1");
		const __cmSigMeasurementType = getOSType!("meas");
		const __cmSigMultiFunctA2BType = getOSType!("mAB ");
		const __cmSigMultiFunctB2AType = getOSType!("mBA ");
		const __cmSigNamedColorType = getOSType!("ncol");
		const __cmSigNamedColor2Type = getOSType!("ncl2");
		const __cmSigParametricCurveType = getOSType!("para");
		const __cmSigProfileDescriptionType = getOSType!("desc");
		const __cmSigProfileSequenceDescType = getOSType!("pseq");
		const __cmSigScreeningType = getOSType!("scrn");
		const __cmSigS15Fixed16Type = getOSType!("sf32");
		const __cmSigSignatureType = getOSType!("sig ");
		const __cmSigTextType = getOSType!("text");
		const __cmSigU16Fixed16Type = getOSType!("uf32");
		const __cmSigU1Fixed15Type = getOSType!("uf16");
		const __cmSigUInt8Type = getOSType!("ui08");
		const __cmSigUInt16Type = getOSType!("ui16");
		const __cmSigUInt32Type = getOSType!("ui32");
		const __cmSigUInt64Type = getOSType!("ui64");
		const __cmSigUcrBgType = getOSType!("bfd ");
		const __cmSigUnicodeTextType = getOSType!("utxt");
		const __cmSigViewingConditionsType = getOSType!("view");
		const __cmSigXYZType = getOSType!("XYZ ");
		const __cmSigPS2CRDVMSizeType = getOSType!("psvm");
		const __cmSigVideoCardGammaType = getOSType!("vcgt");
		const __cmSigMakeAndModelType = getOSType!("mmod");
		const __cmSigNativeDisplayInfoType = getOSType!("ndin");
		const __cmSigMultiLocalizedUniCodeType = getOSType!("mluc");
		const __cmTechnologyDigitalCamera = getOSType!("dcam");
		const __cmTechnologyFilmScanner = getOSType!("fscn");
		const __cmTechnologyReflectiveScanner = getOSType!("rscn");
		const __cmTechnologyInkJetPrinter = getOSType!("ijet");
		const __cmTechnologyThermalWaxPrinter = getOSType!("twax");
		const __cmTechnologyElectrophotographicPrinter = getOSType!("epho");
		const __cmTechnologyElectrostaticPrinter = getOSType!("esta");
		const __cmTechnologyDyeSublimationPrinter = getOSType!("dsub");
		const __cmTechnologyPhotographicPaperPrinter = getOSType!("rpho");
		const __cmTechnologyFilmWriter = getOSType!("fprn");
		const __cmTechnologyVideoMonitor = getOSType!("vidm");
		const __cmTechnologyVideoCamera = getOSType!("vidc");
		const __cmTechnologyProjectionTelevision = getOSType!("pjtv");
		const __cmTechnologyCRTDisplay = getOSType!("CRT ");
		const __cmTechnologyPMDisplay = getOSType!("PMD ");
		const __cmTechnologyAMDisplay = getOSType!("AMD ");
		const __cmTechnologyPhotoCD = getOSType!("KPCD");
		const __cmTechnologyPhotoImageSetter = getOSType!("imgs");
		const __cmTechnologyGravure = getOSType!("grav");
		const __cmTechnologyOffsetLithography = getOSType!("offs");
		const __cmTechnologySilkscreen = getOSType!("silk");
		const __cmTechnologyFlexography = getOSType!("flex");
		const __cmXYZData = getOSType!("XYZ ");
		const __cmLabData = getOSType!("Lab ");
		const __cmLuvData = getOSType!("Luv ");
		const __cmYCbCrData = getOSType!("YCbr");
		const __cmYxyData = getOSType!("Yxy ");
		const __cmRGBData = getOSType!("RGB ");
		const __cmSRGBData = getOSType!("sRGB");
		const __cmGrayData = getOSType!("GRAY");
		const __cmHSVData = getOSType!("HSV ");
		const __cmHLSData = getOSType!("HLS ");
		const __cmCMYKData = getOSType!("CMYK");
		const __cmCMYData = getOSType!("CMY ");
		const __cmMCH5Data = getOSType!("MCH5");
		const __cmMCH6Data = getOSType!("MCH6");
		const __cmMCH7Data = getOSType!("MCH7");
		const __cmMCH8Data = getOSType!("MCH8");
		const __cm3CLRData = getOSType!("3CLR");
		const __cm4CLRData = getOSType!("4CLR");
		const __cm5CLRData = getOSType!("5CLR");
		const __cm6CLRData = getOSType!("6CLR");
		const __cm7CLRData = getOSType!("7CLR");
		const __cm8CLRData = getOSType!("8CLR");
		const __cm9CLRData = getOSType!("9CLR");
		const __cm10CLRData = getOSType!("ACLR");
		const __cm11CLRData = getOSType!("BCLR");
		const __cm12CLRData = getOSType!("CCLR");
		const __cm13CLRData = getOSType!("DCLR");
		const __cm14CLRData = getOSType!("ECLR");
		const __cm15CLRData = getOSType!("FCLR");
		const __cmNamedData = getOSType!("NAME");
		const __cmInputClass = getOSType!("scnr");
		const __cmDisplayClass = getOSType!("mntr");
		const __cmOutputClass = getOSType!("prtr");
		const __cmLinkClass = getOSType!("link");
		const __cmAbstractClass = getOSType!("abst");
		const __cmColorSpaceClass = getOSType!("spac");
		const __cmNamedColorClass = getOSType!("nmcl");
		const __cmMacintosh = getOSType!("APPL");
		const __cmMicrosoft = getOSType!("MSFT");
		const __cmSolaris = getOSType!("SUNW");
		const __cmSiliconGraphics = getOSType!("SGI ");
		const __cmTaligent = getOSType!("TGNT");
		const __cmCS1ChromTag = getOSType!("chrm");
		const __cmCS1TRCTag = getOSType!("trc ");
		const __cmCS1NameTag = getOSType!("name");
		const __cmCS1CustTag = getOSType!("cust");
	}
}

enum
{
	cmICCProfileVersion4 = 0x04000000,
	cmICCProfileVersion2 = 0x02000000,
	cmICCProfileVersion21 = 0x02100000,
	cmCS2ProfileVersion = cmICCProfileVersion2,
	cmCS1ProfileVersion = 0x00000100
}

enum
{
	cmProfileMajorVersionMask = cast(int)0xFF000000,
	cmCurrentProfileMajorVersion = 0x02000000
}

enum
{
	cmMagicNumber = getOSType!("acsp")
}

enum
{
	cmICCReservedFlagsMask = 0x0000FFFF,
	cmEmbeddedMask = 0x00000001,
	cmEmbeddedUseMask = 0x00000002,
	cmBlackPointCompensationMask = 0x00000004,
	cmCMSReservedFlagsMask = cast(int)0xFFFF0000,
	cmQualityMask = 0x00030000,
	cmInterpolationMask = 0x00040000,
	cmGamutCheckingMask = 0x00080000
}

enum
{
	cmEmbeddedProfile = 0,
	cmEmbeddedUse = 1
}

enum
{
	cmNormalMode = 0,
	cmDraftMode = 1,
	cmBestMode = 2
}

enum
{
	cmBlackPointCompensation = 1
}

enum
{
	cmReflectiveTransparentMask = 0x00000001,
	cmGlossyMatteMask = 0x00000002
}

enum
{
	cmReflective = 0,
	cmGlossy = 1
}

enum
{
	cmPerceptual = 0,
	cmRelativeColorimetric = 1,
	cmSaturation = 2,
	cmAbsoluteColorimetric = 3
}

enum
{
	cmAsciiData = 0,
	cmBinaryData = 1
}

enum
{
	cmPrtrDefaultScreens = 0,
	cmLinesPer = 1
}

enum
{
	cmNumHeaderElements = 10
}

enum
{
	cmAToB0Tag = getOSType!("A2B0"),
	cmAToB1Tag = getOSType!("A2B1"),
	cmAToB2Tag = getOSType!("A2B2"),
	cmBlueColorantTag = getOSType!("bXYZ"),
	cmBlueTRCTag = getOSType!("bTRC"),
	cmBToA0Tag = getOSType!("B2A0"),
	cmBToA1Tag = getOSType!("B2A1"),
	cmBToA2Tag = getOSType!("B2A2"),
	cmCalibrationDateTimeTag = getOSType!("calt"),
	cmChromaticAdaptationTag = getOSType!("chad"),
	cmCharTargetTag = getOSType!("targ"),
	cmCopyrightTag = getOSType!("cprt"),
	cmDeviceMfgDescTag = getOSType!("dmnd"),
	cmDeviceModelDescTag = getOSType!("dmdd"),
	cmGamutTag = getOSType!("gamt"),
	cmGrayTRCTag = getOSType!("kTRC"),
	cmGreenColorantTag = getOSType!("gXYZ"),
	cmGreenTRCTag = getOSType!("gTRC"),
	cmLuminanceTag = getOSType!("lumi"),
	cmMeasurementTag = getOSType!("meas"),
	cmMediaBlackPointTag = getOSType!("bkpt"),
	cmMediaWhitePointTag = getOSType!("wtpt"),
	cmNamedColorTag = getOSType!("ncol"),
	cmNamedColor2Tag = getOSType!("ncl2"),
	cmPreview0Tag = getOSType!("pre0"),
	cmPreview1Tag = getOSType!("pre1"),
	cmPreview2Tag = getOSType!("pre2"),
	cmProfileDescriptionTag = getOSType!("desc"),
	cmProfileSequenceDescTag = getOSType!("pseq"),
	cmPS2CRD0Tag = getOSType!("psd0"),
	cmPS2CRD1Tag = getOSType!("psd1"),
	cmPS2CRD2Tag = getOSType!("psd2"),
	cmPS2CRD3Tag = getOSType!("psd3"),
	cmPS2CSATag = getOSType!("ps2s"),
	cmPS2RenderingIntentTag = getOSType!("ps2i"),
	cmRedColorantTag = getOSType!("rXYZ"),
	cmRedTRCTag = getOSType!("rTRC"),
	cmScreeningDescTag = getOSType!("scrd"),
	cmScreeningTag = getOSType!("scrn"),
	cmTechnologyTag = getOSType!("tech"),
	cmUcrBgTag = getOSType!("bfd "),
	cmViewingConditionsDescTag = getOSType!("vued"),
	cmViewingConditionsTag = getOSType!("view")
}

enum
{
	cmPS2CRDVMSizeTag = getOSType!("psvm"),
	cmVideoCardGammaTag = getOSType!("vcgt"),
	cmMakeAndModelTag = getOSType!("mmod"),
	cmProfileDescriptionMLTag = getOSType!("dscm"),
	cmNativeDisplayInfoTag = getOSType!("ndin")
}

enum
{
	cmSigCrdInfoType = getOSType!("crdi"),
	cmSigCurveType = getOSType!("curv"),
	cmSigDataType = getOSType!("data"),
	cmSigDateTimeType = getOSType!("dtim"),
	cmSigLut16Type = getOSType!("mft2"),
	cmSigLut8Type = getOSType!("mft1"),
	cmSigMeasurementType = getOSType!("meas"),
	cmSigMultiFunctA2BType = getOSType!("mAB "),
	cmSigMultiFunctB2AType = getOSType!("mBA "),
	cmSigNamedColorType = getOSType!("ncol"),
	cmSigNamedColor2Type = getOSType!("ncl2"),
	cmSigParametricCurveType = getOSType!("para"),
	cmSigProfileDescriptionType = getOSType!("desc"),
	cmSigProfileSequenceDescType = getOSType!("pseq"),
	cmSigScreeningType = getOSType!("scrn"),
	cmSigS15Fixed16Type = getOSType!("sf32"),
	cmSigSignatureType = getOSType!("sig "),
	cmSigTextType = getOSType!("text"),
	cmSigU16Fixed16Type = getOSType!("uf32"),
	cmSigU1Fixed15Type = getOSType!("uf16"),
	cmSigUInt8Type = getOSType!("ui08"),
	cmSigUInt16Type = getOSType!("ui16"),
	cmSigUInt32Type = getOSType!("ui32"),
	cmSigUInt64Type = getOSType!("ui64"),
	cmSigUcrBgType = getOSType!("bfd "),
	cmSigUnicodeTextType = getOSType!("utxt"),
	cmSigViewingConditionsType = getOSType!("view"),
	cmSigXYZType = getOSType!("XYZ ")
}

enum
{
	cmSigPS2CRDVMSizeType = getOSType!("psvm"),
	cmSigVideoCardGammaType = getOSType!("vcgt"),
	cmSigMakeAndModelType = getOSType!("mmod"),
	cmSigNativeDisplayInfoType = getOSType!("ndin"),
	cmSigMultiLocalizedUniCodeType = getOSType!("mluc")
}

enum
{
	cmTechnologyDigitalCamera = getOSType!("dcam"),
	cmTechnologyFilmScanner = getOSType!("fscn"),
	cmTechnologyReflectiveScanner = getOSType!("rscn"),
	cmTechnologyInkJetPrinter = getOSType!("ijet"),
	cmTechnologyThermalWaxPrinter = getOSType!("twax"),
	cmTechnologyElectrophotographicPrinter = getOSType!("epho"),
	cmTechnologyElectrostaticPrinter = getOSType!("esta"),
	cmTechnologyDyeSublimationPrinter = getOSType!("dsub"),
	cmTechnologyPhotographicPaperPrinter = getOSType!("rpho"),
	cmTechnologyFilmWriter = getOSType!("fprn"),
	cmTechnologyVideoMonitor = getOSType!("vidm"),
	cmTechnologyVideoCamera = getOSType!("vidc"),
	cmTechnologyProjectionTelevision = getOSType!("pjtv"),
	cmTechnologyCRTDisplay = getOSType!("CRT "),
	cmTechnologyPMDisplay = getOSType!("PMD "),
	cmTechnologyAMDisplay = getOSType!("AMD "),
	cmTechnologyPhotoCD = getOSType!("KPCD"),
	cmTechnologyPhotoImageSetter = getOSType!("imgs"),
	cmTechnologyGravure = getOSType!("grav"),
	cmTechnologyOffsetLithography = getOSType!("offs"),
	cmTechnologySilkscreen = getOSType!("silk"),
	cmTechnologyFlexography = getOSType!("flex")
}

enum
{
	cmFlare0 = 0x00000000,
	cmFlare100 = 0x00000001
}

enum
{
	cmGeometryUnknown = 0x00000000,
	cmGeometry045or450 = 0x00000001,
	cmGeometry0dord0 = 0x00000002
}

enum
{
	cmStdobsUnknown = 0x00000000,
	cmStdobs1931TwoDegrees = 0x00000001,
	cmStdobs1964TenDegrees = 0x00000002
}

enum
{
	cmIlluminantUnknown = 0x00000000,
	cmIlluminantD50 = 0x00000001,
	cmIlluminantD65 = 0x00000002,
	cmIlluminantD93 = 0x00000003,
	cmIlluminantF2 = 0x00000004,
	cmIlluminantD55 = 0x00000005,
	cmIlluminantA = 0x00000006,
	cmIlluminantEquiPower = 0x00000007,
	cmIlluminantF8 = 0x00000008
}

enum
{
	cmSpotFunctionUnknown = 0,
	cmSpotFunctionDefault = 1,
	cmSpotFunctionRound = 2,
	cmSpotFunctionDiamond = 3,
	cmSpotFunctionEllipse = 4,
	cmSpotFunctionLine = 5,
	cmSpotFunctionSquare = 6,
	cmSpotFunctionCross = 7
}

enum
{
	cmXYZData = getOSType!("XYZ "),
	cmLabData = getOSType!("Lab "),
	cmLuvData = getOSType!("Luv "),
	cmYCbCrData = getOSType!("YCbr"),
	cmYxyData = getOSType!("Yxy "),
	cmRGBData = getOSType!("RGB "),
	cmSRGBData = getOSType!("sRGB"),
	cmGrayData = getOSType!("GRAY"),
	cmHSVData = getOSType!("HSV "),
	cmHLSData = getOSType!("HLS "),
	cmCMYKData = getOSType!("CMYK"),
	cmCMYData = getOSType!("CMY "),
	cmMCH5Data = getOSType!("MCH5"),
	cmMCH6Data = getOSType!("MCH6"),
	cmMCH7Data = getOSType!("MCH7"),
	cmMCH8Data = getOSType!("MCH8"),
	cm3CLRData = getOSType!("3CLR"),
	cm4CLRData = getOSType!("4CLR"),
	cm5CLRData = getOSType!("5CLR"),
	cm6CLRData = getOSType!("6CLR"),
	cm7CLRData = getOSType!("7CLR"),
	cm8CLRData = getOSType!("8CLR"),
	cm9CLRData = getOSType!("9CLR"),
	cm10CLRData = getOSType!("ACLR"),
	cm11CLRData = getOSType!("BCLR"),
	cm12CLRData = getOSType!("CCLR"),
	cm13CLRData = getOSType!("DCLR"),
	cm14CLRData = getOSType!("ECLR"),
	cm15CLRData = getOSType!("FCLR"),
	cmNamedData = getOSType!("NAME")
}

enum
{
	cmInputClass = getOSType!("scnr"),
	cmDisplayClass = getOSType!("mntr"),
	cmOutputClass = getOSType!("prtr"),
	cmLinkClass = getOSType!("link"),
	cmAbstractClass = getOSType!("abst"),
	cmColorSpaceClass = getOSType!("spac"),
	cmNamedColorClass = getOSType!("nmcl")
}

enum
{
	cmMacintosh = getOSType!("APPL"),
	cmMicrosoft = getOSType!("MSFT"),
	cmSolaris = getOSType!("SUNW"),
	cmSiliconGraphics = getOSType!("SGI "),
	cmTaligent = getOSType!("TGNT")
}

enum
{
	cmParametricType0 = 0,
	cmParametricType1 = 1,
	cmParametricType2 = 2,
	cmParametricType3 = 3,
	cmParametricType4 = 4
}

enum
{
	cmCS1ChromTag = getOSType!("chrm"),
	cmCS1TRCTag = getOSType!("trc "),
	cmCS1NameTag = getOSType!("name"),
	cmCS1CustTag = getOSType!("cust")
}

enum
{
	cmVideoCardGammaTableType = 0,
	cmVideoCardGammaFormulaType = 1
}

struct CMDateTime
{
	ushort year;
	ushort month;
	ushort dayOfTheMonth;
	ushort hours;
	ushort minutes;
	ushort seconds;
}


struct CMFixedXYColor
{
	int x;
	int y;
}


struct CMFixedXYZColor
{
	int X;
	int Y;
	int Z;
}


struct CMXYZColor
{
	ushort X;
	ushort Y;
	ushort Z;
}

struct CMHeader
{
	uint size;
	OSType CMMType;
	uint applProfileVersion;
	OSType dataType;
	OSType deviceType;
	OSType deviceManufacturer;
	uint deviceModel;
	uint[2] deviceAttributes;
	uint profileNameOffset;
	uint customDataOffset;
	CMMatchFlag flags;
	CMMatchOption options;
	CMXYZColor white;
	CMXYZColor black;
}

struct CM2Header
{
	uint size;
	uint CMMType;
	uint profileVersion;
	uint profileClass;
	uint dataColorSpace;
	uint profileConnectionSpace;
	CMDateTime dateTime;
	uint CS2profileSignature;
	uint platform;
	uint flags;
	uint deviceManufacturer;
	uint deviceModel;
	UInt32* deviceAttributes;
	uint renderingIntent;
	CMFixedXYZColor white;
	uint creator;
	char* reserved;
}


struct CM4Header
{
	uint size;
	uint CMMType;
	uint profileVersion;
	uint profileClass;
	uint dataColorSpace;
	uint profileConnectionSpace;
	CMDateTime dateTime;
	uint CS2profileSignature;
	uint platform;
	uint flags;
	uint deviceManufacturer;
	uint deviceModel;
	UInt32* deviceAttributes;
	uint renderingIntent;
	CMFixedXYZColor white;
	uint creator;
	ubyte[16] digest;
	char* reserved;
}


struct CMTagRecord
{
	uint tag;
	uint elementOffset;
	uint elementSize;
}


struct CMTagElemTable
{
	uint count;
	CMTagRecord* tagList;
}


struct CM2Profile
{
	CM2Header header;
	CMTagElemTable tagTable;
	char* elemData;
}


struct CMAdaptationMatrixType
{
	uint typeDescriptor;
	uint reserved;
	Fixed* adaptationMatrix;
}


struct CMCurveType
{
	uint typeDescriptor;
	uint reserved;
	uint countValue;
	UInt16* data;
}


struct CMDataType
{
	uint typeDescriptor;
	uint reserved;
	uint dataFlag;
	char* data;
}


struct CMDateTimeType
{
	uint typeDescriptor;
	uint reserved;
	CMDateTime dateTime;
}


struct CMLut16Type
{
	uint typeDescriptor;
	uint reserved;
	ubyte inputChannels;
	ubyte outputChannels;
	ubyte gridPoints;
	ubyte reserved2;
	Fixed* matrix;
	ushort inputTableEntries;
	ushort outputTableEntries;
	UInt16* inputTable;
}


struct CMLut8Type
{
	uint typeDescriptor;
	uint reserved;
	ubyte inputChannels;
	ubyte outputChannels;
	ubyte gridPoints;
	ubyte reserved2;
	Fixed* matrix;
	char* inputTable;
}


struct CMMultiFunctLutType
{
	uint typeDescriptor;
	uint reserved;
	ubyte inputChannels;
	ubyte outputChannels;
	ushort reserved2;
	uint offsetBcurves;
	uint offsetMatrix;
	uint offsetMcurves;
	uint offsetCLUT;
	uint offsetAcurves;
	char* data;
}


struct CMMultiFunctCLUTType
{
	char* gridPoints;
	ubyte entrySize;
	char* reserved;
	char* data;
}


struct CMMeasurementType
{
	uint typeDescriptor;
	uint reserved;
	uint standardObserver;
	CMFixedXYZColor backingXYZ;
	uint geometry;
	uint flare;
	uint illuminant;
}


struct CMNamedColorType
{
	uint typeDescriptor;
	uint reserved;
	uint vendorFlag;
	uint count;
	char* prefixName;
}


struct CMNamedColor2EntryType
{
	char* rootName;
	UInt16* PCSColorCoords;
	UInt16* DeviceColorCoords;
}


struct CMNamedColor2Type
{
	uint typeDescriptor;
	uint reserved;
	uint vendorFlag;
	uint count;
	uint deviceChannelCount;
	char* prefixName;
	char* suffixName;
	char* data;
}


struct CMNativeDisplayInfo
{
	uint dataSize;
	CMFixedXYColor redPhosphor;
	CMFixedXYColor greenPhosphor;
	CMFixedXYColor bluePhosphor;
	CMFixedXYColor whitePoint;
	int redGammaValue;
	int greenGammaValue;
	int blueGammaValue;
	ushort gammaChannels;
	ushort gammaEntryCount;
	ushort gammaEntrySize;
	char* gammaData;
}


struct CMNativeDisplayInfoType
{
	uint typeDescriptor;
	uint reserved;
	CMNativeDisplayInfo nativeDisplayInfo;
}


struct CMParametricCurveType
{
	uint typeDescriptor;
	uint reserved;
	ushort functionType;
	ushort reserved2;
	Fixed* value;
}


struct CMTextDescriptionType
{
	uint typeDescriptor;
	uint reserved;
	uint ASCIICount;
	char* ASCIIName;
}


struct CMTextType
{
	uint typeDescriptor;
	uint reserved;
	char* text;
}


struct CMUnicodeTextType
{
	uint typeDescriptor;
	uint reserved;
	wchar* text;
}


struct CMScreeningChannelRec
{
	int frequency;
	int angle;
	uint spotFunction;
}


struct CMScreeningType
{
	uint typeDescriptor;
	uint reserved;
	uint screeningFlag;
	uint channelCount;
	CMScreeningChannelRec* channelInfo;
}


struct CMSignatureType
{
	uint typeDescriptor;
	uint reserved;
	uint signature;
}


struct CMS15Fixed16ArrayType
{
	uint typeDescriptor;
	uint reserved;
	Fixed* value;
}


struct CMU16Fixed16ArrayType
{
	uint typeDescriptor;
	uint reserved;
	UInt32* value;
}


struct CMUInt8ArrayType
{
	uint typeDescriptor;
	uint reserved;
	char* value;
}


struct CMUInt16ArrayType
{
	uint typeDescriptor;
	uint reserved;
	UInt16* value;
}


struct CMUInt32ArrayType
{
	uint typeDescriptor;
	uint reserved;
	UInt32* value;
}


struct CMUInt64ArrayType
{
	uint typeDescriptor;
	uint reserved;
	UInt32* value;
}


struct CMViewingConditionsType
{
	uint typeDescriptor;
	uint reserved;
	CMFixedXYZColor illuminant;
	CMFixedXYZColor surround;
	uint stdIlluminant;
}


struct CMXYZType
{
	uint typeDescriptor;
	uint reserved;
	CMFixedXYZColor* XYZ;
}


struct CMProfileSequenceDescType
{
	uint typeDescriptor;
	uint reserved;
	uint count;
	char* data;
}


struct CMUcrBgType
{
	uint typeDescriptor;
	uint reserved;
	uint ucrCount;
	UInt16* ucrValues;
}


struct CMIntentCRDVMSize
{
	uint renderingIntent;
	uint VMSize;
}


struct CMPS2CRDVMSizeType
{
	uint typeDescriptor;
	uint reserved;
	uint count;
	CMIntentCRDVMSize* intentCRD;
}


struct CMVideoCardGammaTable
{
	ushort channels;
	ushort entryCount;
	ushort entrySize;
	char* data;
}


struct CMVideoCardGammaFormula
{
	int redGamma;
	int redMin;
	int redMax;
	int greenGamma;
	int greenMin;
	int greenMax;
	int blueGamma;
	int blueMin;
	int blueMax;
}


struct CMVideoCardGamma
{
	 uint tagType;
	 
	 union
	 {
		 CMVideoCardGammaTable table;
		 CMVideoCardGammaFormula formula;
	 }
}

struct CMVideoCardGammaType
{
	uint typeDescriptor;
	UInt32 reserved;
	CMVideoCardGamma gamma;
}


struct CMMakeAndModel
{
	uint manufacturer;
	uint model;
	uint serialNumber;
	uint manufactureDate;
	uint reserved1;
	uint reserved2;
	uint reserved3;
	UInt32 reserved4;
}


struct CMMakeAndModelType
{
	uint typeDescriptor;
	UInt32 reserved;
	CMMakeAndModel makeAndModel;
}


struct CMMultiLocalizedUniCodeEntryRec
{
	char* languageCode;
	uint regionCode;
	uint textLength;
	UInt32 textOffset;
}


struct CMMultiLocalizedUniCodeType
{
	uint typeDescriptor;
	uint reserved;
	uint entryCount;
	UInt32 entrySize;
}