public IccTagTypeBase GetTag(
int tagSignature
)
tagSignature
Tag signature for the tag to be returned.
Object that contains the requested tag, casted to the proper ICC tag class.
///
using Leadtools;
using Leadtools.ColorConversion;
using Leadtools.Codecs;
public void GetIccProfileTagsExample()
{
// Note that the tag types should be the same as the ones used in the Example above.
// 1. chromaticityType
IccProfileExtended iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccChromaticityTagType.icc"));
IccChromaticityTagType chromaticityType = new IccChromaticityTagType();
chromaticityType = (IccChromaticityTagType)iccProfile.GetTag(IccTag.ChromaticityTag);
// 2. colorantOrderType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccColorantOrderTagType.icc"));
IccColorantOrderTagType colorantOrderType = new IccColorantOrderTagType();
colorantOrderType = (IccColorantOrderTagType)iccProfile.GetTag(IccTag.ColorantOrderTag);
// 3. colorantTableType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccColorantTableTagType.icc"));
IccColorantTableTagType colorantTableType = new IccColorantTableTagType();
colorantTableType = (IccColorantTableTagType)iccProfile.GetTag(IccTag.ColorantTableTag);
// 4. curveType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccCurveTagType.icc"));
IccCurveTagType curveType = new IccCurveTagType();
curveType = (IccCurveTagType)iccProfile.GetTag(IccTag.GrayTRCTag);
// 5. dataType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccDataTagType.icc"));
IccDataTagType dataType = new IccDataTagType();
dataType = (IccDataTagType)iccProfile.GetTag(0x64617461);
// 6. dateTimeType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccDateTimeTagType.icc"));
IccDateTimeTagType dateTimeType = new IccDateTimeTagType();
dateTimeType = (IccDateTimeTagType)iccProfile.GetTag(IccTag.CalibrationDateTimeTag);
// 7. lut16Type
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccLookupTable16TagType.icc"));
IccLookupTable16TagType lut16Type = new IccLookupTable16TagType();
lut16Type = (IccLookupTable16TagType)iccProfile.GetTag(IccTag.BToA0Tag);
// 8. lut8Type
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccLookupTable8TagType.icc"));
IccLookupTable8TagType lut8Type = new IccLookupTable8TagType();
lut8Type = (IccLookupTable8TagType)iccProfile.GetTag(IccTag.BToA1Tag);
// 9. lutAToBType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccLookupTableAToBTagType.icc"));
IccLookupTableAToBTagType lutAToBType = new IccLookupTableAToBTagType();
lutAToBType = (IccLookupTableAToBTagType)iccProfile.GetTag(IccTag.AToB2Tag);
// 10. lutBToAType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccLookupTableBToATagType.icc"));
IccLookupTableBToATagType lutBToAType = new IccLookupTableBToATagType();
lutBToAType = (IccLookupTableBToATagType)iccProfile.GetTag(IccTag.BToA2Tag);
// 11. measurementType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccMeasurementTagType.icc"));
IccMeasurementTagType measurementType = new IccMeasurementTagType();
measurementType = (IccMeasurementTagType)iccProfile.GetTag(IccTag.MeasurementTag);
// 12. multiLocalizedUnicodeType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccMultiLocalizedUnicodeTagType.icc"));
IccMultiLocalizedUnicodeTagType multiLocalizedUnicodeType = new IccMultiLocalizedUnicodeTagType();
multiLocalizedUnicodeType = (IccMultiLocalizedUnicodeTagType)iccProfile.GetTag(IccTag.DeviceModelDescTag);
// 13. namedColor2Type
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccNamedColor2TagType.icc"));
IccNamedColor2TagType namedColor2Type = new IccNamedColor2TagType();
namedColor2Type = (IccNamedColor2TagType)iccProfile.GetTag(IccTag.NamedColor2Tag);
// 14. parametricCurveType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccParametricCurveTagType.icc"));
IccParametricCurveTagType parametricCurveType = new IccParametricCurveTagType();
parametricCurveType = (IccParametricCurveTagType)iccProfile.GetTag(IccTag.GrayTRCTag);
// 15. profileSequenceDescType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccProfileSequenceDescriptionTagType.icc"));
IccProfileSequenceDescriptionTagType profileSequenceDescType = new IccProfileSequenceDescriptionTagType();
profileSequenceDescType = (IccProfileSequenceDescriptionTagType)iccProfile.GetTag(IccTag.ProfileSequenceDescTag);
// 16. responseCurveSet16Type
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccResponseCurveSet16TagType.icc"));
IccResponseCurveSet16TagType responseCurveSet16Type = new IccResponseCurveSet16TagType();
responseCurveSet16Type = (IccResponseCurveSet16TagType)iccProfile.GetTag(IccTag.OutputResponseTag);
// 17. s15Fixed16ArrayType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccS15Fixed16ArrayTagType.icc"));
IccS15Fixed16ArrayTagType s15Fixed16ArrayType = new IccS15Fixed16ArrayTagType();
s15Fixed16ArrayType = (IccS15Fixed16ArrayTagType)iccProfile.GetTag(IccTag.ChromaticAdaptationTag);
// 18. signatureType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccSignatureTagType.icc"));
IccSignatureTagType signatureType = new IccSignatureTagType();
signatureType = (IccSignatureTagType)iccProfile.GetTag(IccTag.TechnologyTag);
// 19. textType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccTextTagType.icc"));
IccTextTagType textType = new IccTextTagType();
textType = (IccTextTagType)iccProfile.GetTag(IccTag.CharTargetTag);
// 20. u16Fixed16ArrayType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccU16Fixed16ArrayTagType.icc"));
IccU16Fixed16ArrayTagType u16Fixed16ArrayType = new IccU16Fixed16ArrayTagType();
u16Fixed16ArrayType = (IccU16Fixed16ArrayTagType)iccProfile.GetTag(0x54616741);
// 21. uint16ArrayType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccUint16ArrayTagType.icc"));
IccUint16ArrayTagType uint16ArrayType = new IccUint16ArrayTagType();
uint16ArrayType = (IccUint16ArrayTagType)iccProfile.GetTag(0x54616742);
// 22. uint32ArrayType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccUint32ArrayTagType.icc"));
IccUint32ArrayTagType uint32ArrayType = new IccUint32ArrayTagType();
uint32ArrayType = (IccUint32ArrayTagType)iccProfile.GetTag(0x54616743);
// 23. uint64ArrayType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccUint64ArrayTagType.icc"));
IccUint64ArrayTagType uint64ArrayType = new IccUint64ArrayTagType();
uint64ArrayType = (IccUint64ArrayTagType)iccProfile.GetTag(0x54616744);
// 24. uint8ArrayType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccUint8ArrayTagType.icc"));
IccUint8ArrayTagType uint8ArrayType = new IccUint8ArrayTagType();
uint8ArrayType = (IccUint8ArrayTagType)iccProfile.GetTag(0x54616745);
// 25. unknownType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccUnknownTagType.icc"));
IccUnknownTagType unknownType = new IccUnknownTagType();
unknownType = (IccUnknownTagType)iccProfile.GetTag(0x54616746);
// 26. viewingConditionsType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccViewingConditionsTagType.icc"));
IccViewingConditionsTagType viewingConditionsType = new IccViewingConditionsTagType();
viewingConditionsType = (IccViewingConditionsTagType)iccProfile.GetTag(IccTag.ViewingConditionsTag);
// 27. xyzType
iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "GetIccProfileTag", "IccXyzTagType.icc"));
IccXyzTagType xyzType = new IccXyzTagType();
xyzType = (IccXyzTagType)iccProfile.GetTag(IccTag.RedMatrixColumnTag);
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images";
}