←Select platform

GetTag Method

Summary
Gets an existing tag from the ICC profile.
Syntax
C#
C++/CLI
Python
public IccTagTypeBase GetTag( 
   int tagSignature 
) 
public: 
IccTagTypeBase^ GetTag(  
   int tagSignature 
)  
def GetTag(self,tagSignature): 

Parameters

tagSignature
Tag signature for the tag to be returned.

Return Value

Object that contains the requested tag, casted to the proper ICC tag class.

Example

///

C#
using Leadtools; 
using Leadtools.ColorConversion; 
 
 
public void GetIccProfileTagsExample() 
{ 
   // Note that the tag types shoule be the same as the ones used in the Example above. 
   // 1. chromaticityType 
   IccProfileExtended iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccChromaticityTagTypeCS.icc")); 
   IccChromaticityTagType chromaticityType = new IccChromaticityTagType(); 
   chromaticityType = (IccChromaticityTagType)iccProfile.GetTag(IccTag.ChromaticityTag); 
 
   // 2. colorantOrderType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccColorantOrderTagTypeCS.icc")); 
   IccColorantOrderTagType colorantOrderType = new IccColorantOrderTagType(); 
   colorantOrderType = (IccColorantOrderTagType)iccProfile.GetTag(IccTag.ColorantOrderTag); 
 
   // 3. colorantTableType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccColorantTableTagTypeCS.icc")); 
   IccColorantTableTagType colorantTableType = new IccColorantTableTagType(); 
   colorantTableType = (IccColorantTableTagType)iccProfile.GetTag(IccTag.ColorantTableTag); 
 
   // 4. curveType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccCurveTagTypeCS.icc")); 
   IccCurveTagType curveType = new IccCurveTagType(); 
   curveType = (IccCurveTagType)iccProfile.GetTag(IccTag.GrayTRCTag); 
 
   // 5. dataType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccDataTagTypeCS.icc")); 
   IccDataTagType dataType = new IccDataTagType(); 
   dataType = (IccDataTagType)iccProfile.GetTag(0x64617461); 
 
   // 6. dateTimeType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccDateTimeTagTypeCS.icc")); 
   IccDateTimeTagType dateTimeType = new IccDateTimeTagType(); 
   dateTimeType = (IccDateTimeTagType)iccProfile.GetTag(IccTag.CalibrationDateTimeTag); 
 
   // 7. lut16Type 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTable16TagTypeCS.icc")); 
   IccLookupTable16TagType lut16Type = new IccLookupTable16TagType(); 
   lut16Type = (IccLookupTable16TagType)iccProfile.GetTag(IccTag.BToA0Tag); 
 
   // 8. lut8Type 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTable8TagTypeCS.icc")); 
   IccLookupTable8TagType lut8Type = new IccLookupTable8TagType(); 
   lut8Type = (IccLookupTable8TagType)iccProfile.GetTag(IccTag.BToA1Tag); 
 
   // 9. lutAToBType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTableAToBTagTypeCS.icc")); 
   IccLookupTableAToBTagType lutAToBType = new IccLookupTableAToBTagType(); 
   lutAToBType = (IccLookupTableAToBTagType)iccProfile.GetTag(IccTag.AToB2Tag); 
 
   // 10. lutBToAType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTableBToATagTypeCS.icc")); 
   IccLookupTableBToATagType lutBToAType = new IccLookupTableBToATagType(); 
   lutBToAType = (IccLookupTableBToATagType)iccProfile.GetTag(IccTag.BToA2Tag); 
 
   // 11. measurementType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccMeasurementTagTypeCS.icc")); 
   IccMeasurementTagType measurementType = new IccMeasurementTagType(); 
   measurementType = (IccMeasurementTagType)iccProfile.GetTag(IccTag.MeasurementTag); 
 
   // 12. multiLocalizedUnicodeType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccMultiLocalizedUnicodeTagTypeCS.icc")); 
   IccMultiLocalizedUnicodeTagType multiLocalizedUnicodeType = new IccMultiLocalizedUnicodeTagType(); 
   multiLocalizedUnicodeType = (IccMultiLocalizedUnicodeTagType)iccProfile.GetTag(IccTag.DeviceModelDescTag); 
 
   // 13. namedColor2Type 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccNamedColor2TagTypeCS.icc")); 
   IccNamedColor2TagType namedColor2Type = new IccNamedColor2TagType(); 
   namedColor2Type = (IccNamedColor2TagType)iccProfile.GetTag(IccTag.NamedColor2Tag); 
 
   // 14. parametricCurveType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccParametricCurveTagTypeCS.icc")); 
   IccParametricCurveTagType parametricCurveType = new IccParametricCurveTagType(); 
   parametricCurveType = (IccParametricCurveTagType)iccProfile.GetTag(IccTag.GrayTRCTag); 
 
   // 15. profileSequenceDescType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccProfileSequenceDescriptionTagTypeCS.icc")); 
   IccProfileSequenceDescriptionTagType profileSequenceDescType = new IccProfileSequenceDescriptionTagType(); 
   profileSequenceDescType = (IccProfileSequenceDescriptionTagType)iccProfile.GetTag(IccTag.ProfileSequenceDescTag); 
 
   // 16. responseCurveSet16Type 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccResponseCurveSet16TagTypeCS.icc")); 
   IccResponseCurveSet16TagType responseCurveSet16Type = new IccResponseCurveSet16TagType(); 
   responseCurveSet16Type = (IccResponseCurveSet16TagType)iccProfile.GetTag(IccTag.OutputResponseTag); 
 
   // 17. s15Fixed16ArrayType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccS15Fixed16ArrayTagTypeCS.icc")); 
   IccS15Fixed16ArrayTagType s15Fixed16ArrayType = new IccS15Fixed16ArrayTagType(); 
   s15Fixed16ArrayType = (IccS15Fixed16ArrayTagType)iccProfile.GetTag(IccTag.ChromaticAdaptationTag); 
 
   // 18. signatureType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccSignatureTagTypeCS.icc")); 
   IccSignatureTagType signatureType = new IccSignatureTagType(); 
   signatureType = (IccSignatureTagType)iccProfile.GetTag(IccTag.TechnologyTag); 
 
   // 19. textType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccTextTagTypeCS.icc")); 
   IccTextTagType textType = new IccTextTagType(); 
   textType = (IccTextTagType)iccProfile.GetTag(IccTag.CharTargetTag); 
 
   // 20. u16Fixed16ArrayType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccU16Fixed16ArrayTagTypeCS.icc")); 
   IccU16Fixed16ArrayTagType u16Fixed16ArrayType = new IccU16Fixed16ArrayTagType(); 
   u16Fixed16ArrayType = (IccU16Fixed16ArrayTagType)iccProfile.GetTag(0x54616741); 
 
   // 21. uint16ArrayType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint16ArrayTagTypeCS.icc")); 
   IccUint16ArrayTagType uint16ArrayType = new IccUint16ArrayTagType(); 
   uint16ArrayType = (IccUint16ArrayTagType)iccProfile.GetTag(0x54616742); 
 
   // 22. uint32ArrayType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint32ArrayTagTypeCS.icc")); 
   IccUint32ArrayTagType uint32ArrayType = new IccUint32ArrayTagType(); 
   uint32ArrayType = (IccUint32ArrayTagType)iccProfile.GetTag(0x54616743); 
 
   // 23. uint64ArrayType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint64ArrayTagTypeCS.icc")); 
   IccUint64ArrayTagType uint64ArrayType = new IccUint64ArrayTagType(); 
   uint64ArrayType = (IccUint64ArrayTagType)iccProfile.GetTag(0x54616744); 
 
   // 24. uint8ArrayType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint8ArrayTagTypeCS.icc")); 
   IccUint8ArrayTagType uint8ArrayType = new IccUint8ArrayTagType(); 
   uint8ArrayType = (IccUint8ArrayTagType)iccProfile.GetTag(0x54616745); 
 
   // 25. unknownType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUnknownTagTypeCS.icc")); 
   IccUnknownTagType unknownType = new IccUnknownTagType(); 
   unknownType = (IccUnknownTagType)iccProfile.GetTag(0x54616746); 
 
   // 26. viewingConditionsType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccViewingConditionsTagTypeCS.icc")); 
   IccViewingConditionsTagType viewingConditionsType = new IccViewingConditionsTagType(); 
   viewingConditionsType = (IccViewingConditionsTagType)iccProfile.GetTag(IccTag.ViewingConditionsTag); 
 
   // 27. xyzType 
   iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccXyzTagTypeCS.icc")); 
   IccXyzTagType xyzType = new IccXyzTagType(); 
   xyzType = (IccXyzTagType)iccProfile.GetTag(IccTag.RedMatrixColumnTag); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ColorConversion Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.