Gets an existing tag from the ICC profile.
public IccTagTypeBase GetTag(int tagSignature)
Public Function GetTag( _ByVal tagSignature As Integer _) As IccTagTypeBase
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;public void GetIccProfileTagsExample(){// Note that the tag types shoule be the same as the ones used in the Example above.// 1. chromaticityTypeIccProfileExtended iccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccChromaticityTagTypeCS.icc"));IccChromaticityTagType chromaticityType = new IccChromaticityTagType();chromaticityType = (IccChromaticityTagType)iccProfile.GetTag(IccTag.ChromaticityTag);// 2. colorantOrderTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccColorantOrderTagTypeCS.icc"));IccColorantOrderTagType colorantOrderType = new IccColorantOrderTagType();colorantOrderType = (IccColorantOrderTagType)iccProfile.GetTag(IccTag.ColorantOrderTag);// 3. colorantTableTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccColorantTableTagTypeCS.icc"));IccColorantTableTagType colorantTableType = new IccColorantTableTagType();colorantTableType = (IccColorantTableTagType)iccProfile.GetTag(IccTag.ColorantTableTag);// 4. curveTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccCurveTagTypeCS.icc"));IccCurveTagType curveType = new IccCurveTagType();curveType = (IccCurveTagType)iccProfile.GetTag(IccTag.GrayTRCTag);// 5. dataTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccDataTagTypeCS.icc"));IccDataTagType dataType = new IccDataTagType();dataType = (IccDataTagType)iccProfile.GetTag(0x64617461);// 6. dateTimeTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccDateTimeTagTypeCS.icc"));IccDateTimeTagType dateTimeType = new IccDateTimeTagType();dateTimeType = (IccDateTimeTagType)iccProfile.GetTag(IccTag.CalibrationDateTimeTag);// 7. lut16TypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTable16TagTypeCS.icc"));IccLookupTable16TagType lut16Type = new IccLookupTable16TagType();lut16Type = (IccLookupTable16TagType)iccProfile.GetTag(IccTag.BToA0Tag);// 8. lut8TypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTable8TagTypeCS.icc"));IccLookupTable8TagType lut8Type = new IccLookupTable8TagType();lut8Type = (IccLookupTable8TagType)iccProfile.GetTag(IccTag.BToA1Tag);// 9. lutAToBTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTableAToBTagTypeCS.icc"));IccLookupTableAToBTagType lutAToBType = new IccLookupTableAToBTagType();lutAToBType = (IccLookupTableAToBTagType)iccProfile.GetTag(IccTag.AToB2Tag);// 10. lutBToATypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTableBToATagTypeCS.icc"));IccLookupTableBToATagType lutBToAType = new IccLookupTableBToATagType();lutBToAType = (IccLookupTableBToATagType)iccProfile.GetTag(IccTag.BToA2Tag);// 11. measurementTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccMeasurementTagTypeCS.icc"));IccMeasurementTagType measurementType = new IccMeasurementTagType();measurementType = (IccMeasurementTagType)iccProfile.GetTag(IccTag.MeasurementTag);// 12. multiLocalizedUnicodeTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccMultiLocalizedUnicodeTagTypeCS.icc"));IccMultiLocalizedUnicodeTagType multiLocalizedUnicodeType = new IccMultiLocalizedUnicodeTagType();multiLocalizedUnicodeType = (IccMultiLocalizedUnicodeTagType)iccProfile.GetTag(IccTag.DeviceModelDescTag);// 13. namedColor2TypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccNamedColor2TagTypeCS.icc"));IccNamedColor2TagType namedColor2Type = new IccNamedColor2TagType();namedColor2Type = (IccNamedColor2TagType)iccProfile.GetTag(IccTag.NamedColor2Tag);// 14. parametricCurveTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccParametricCurveTagTypeCS.icc"));IccParametricCurveTagType parametricCurveType = new IccParametricCurveTagType();parametricCurveType = (IccParametricCurveTagType)iccProfile.GetTag(IccTag.GrayTRCTag);// 15. profileSequenceDescTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccProfileSequenceDescriptionTagTypeCS.icc"));IccProfileSequenceDescriptionTagType profileSequenceDescType = new IccProfileSequenceDescriptionTagType();profileSequenceDescType = (IccProfileSequenceDescriptionTagType)iccProfile.GetTag(IccTag.ProfileSequenceDescTag);// 16. responseCurveSet16TypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccResponseCurveSet16TagTypeCS.icc"));IccResponseCurveSet16TagType responseCurveSet16Type = new IccResponseCurveSet16TagType();responseCurveSet16Type = (IccResponseCurveSet16TagType)iccProfile.GetTag(IccTag.OutputResponseTag);// 17. s15Fixed16ArrayTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccS15Fixed16ArrayTagTypeCS.icc"));IccS15Fixed16ArrayTagType s15Fixed16ArrayType = new IccS15Fixed16ArrayTagType();s15Fixed16ArrayType = (IccS15Fixed16ArrayTagType)iccProfile.GetTag(IccTag.ChromaticAdaptationTag);// 18. signatureTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccSignatureTagTypeCS.icc"));IccSignatureTagType signatureType = new IccSignatureTagType();signatureType = (IccSignatureTagType)iccProfile.GetTag(IccTag.TechnologyTag);// 19. textTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccTextTagTypeCS.icc"));IccTextTagType textType = new IccTextTagType();textType = (IccTextTagType)iccProfile.GetTag(IccTag.CharTargetTag);// 20. u16Fixed16ArrayTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccU16Fixed16ArrayTagTypeCS.icc"));IccU16Fixed16ArrayTagType u16Fixed16ArrayType = new IccU16Fixed16ArrayTagType();u16Fixed16ArrayType = (IccU16Fixed16ArrayTagType)iccProfile.GetTag(0x54616741);// 21. uint16ArrayTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint16ArrayTagTypeCS.icc"));IccUint16ArrayTagType uint16ArrayType = new IccUint16ArrayTagType();uint16ArrayType = (IccUint16ArrayTagType)iccProfile.GetTag(0x54616742);// 22. uint32ArrayTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint32ArrayTagTypeCS.icc"));IccUint32ArrayTagType uint32ArrayType = new IccUint32ArrayTagType();uint32ArrayType = (IccUint32ArrayTagType)iccProfile.GetTag(0x54616743);// 23. uint64ArrayTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint64ArrayTagTypeCS.icc"));IccUint64ArrayTagType uint64ArrayType = new IccUint64ArrayTagType();uint64ArrayType = (IccUint64ArrayTagType)iccProfile.GetTag(0x54616744);// 24. uint8ArrayTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint8ArrayTagTypeCS.icc"));IccUint8ArrayTagType uint8ArrayType = new IccUint8ArrayTagType();uint8ArrayType = (IccUint8ArrayTagType)iccProfile.GetTag(0x54616745);// 25. unknownTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUnknownTagTypeCS.icc"));IccUnknownTagType unknownType = new IccUnknownTagType();unknownType = (IccUnknownTagType)iccProfile.GetTag(0x54616746);// 26. viewingConditionsTypeiccProfile = new IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccViewingConditionsTagTypeCS.icc"));IccViewingConditionsTagType viewingConditionsType = new IccViewingConditionsTagType();viewingConditionsType = (IccViewingConditionsTagType)iccProfile.GetTag(IccTag.ViewingConditionsTag);// 27. xyzTypeiccProfile = 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:\Users\Public\Documents\LEADTOOLS Images";}
Imports LeadtoolsImports Leadtools.ColorConversionPublic Sub GetIccProfileTagsExample()' Note that the tag types shoule be the same as the ones used in the Example above.' 1. chromaticityTypeDim iccProfile As New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccChromaticityTagTypeVB.icc"))Dim chromaticityType As New IccChromaticityTagType()chromaticityType = CType(iccProfile.GetTag(IccTag.ChromaticityTag), IccChromaticityTagType)' 2. colorantOrderTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccColorantOrderTagTypeVB.icc"))Dim colorantOrderType As New IccColorantOrderTagType()colorantOrderType = CType(iccProfile.GetTag(IccTag.ColorantOrderTag), IccColorantOrderTagType)' 3. colorantTableTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccColorantTableTagTypeVB.icc"))Dim colorantTableType As New IccColorantTableTagType()colorantTableType = CType(iccProfile.GetTag(IccTag.ColorantTableTag), IccColorantTableTagType)' 4. curveTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccCurveTagTypeVB.icc"))Dim curveType As New IccCurveTagType()curveType = CType(iccProfile.GetTag(IccTag.GrayTRCTag), IccCurveTagType)' 5. dataTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccDataTagTypeVB.icc"))Dim dataType As New IccDataTagType()dataType = CType(iccProfile.GetTag(&H64617461), IccDataTagType)' 6. dateTimeTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccDateTimeTagTypeVB.icc"))Dim dateTimeType As New IccDateTimeTagType()dateTimeType = CType(iccProfile.GetTag(IccTag.CalibrationDateTimeTag), IccDateTimeTagType)' 7. lut16TypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTable16TagTypeVB.icc"))Dim lut16Type As New IccLookupTable16TagType()lut16Type = CType(iccProfile.GetTag(IccTag.BToA0Tag), IccLookupTable16TagType)' 8. lut8TypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTable8TagTypeVB.icc"))Dim lut8Type As New IccLookupTable8TagType()lut8Type = CType(iccProfile.GetTag(IccTag.BToA1Tag), IccLookupTable8TagType)' 9. lutAToBTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTableAToBTagTypeVB.icc"))Dim lutAToBType As New IccLookupTableAToBTagType()lutAToBType = CType(iccProfile.GetTag(IccTag.AToB2Tag), IccLookupTableAToBTagType)' 10. lutBToATypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTableBToATagTypeVB.icc"))Dim lutBToAType As New IccLookupTableBToATagType()lutBToAType = CType(iccProfile.GetTag(IccTag.BToA2Tag), IccLookupTableBToATagType)' 11. measurementTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccMeasurementTagTypeVB.icc"))Dim measurementType As New IccMeasurementTagType()measurementType = CType(iccProfile.GetTag(IccTag.MeasurementTag), IccMeasurementTagType)' 12. multiLocalizedUnicodeTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccMultiLocalizedUnicodeTagTypeVB.icc"))Dim multiLocalizedUnicodeType As New IccMultiLocalizedUnicodeTagType()multiLocalizedUnicodeType = CType(iccProfile.GetTag(IccTag.DeviceModelDescTag), IccMultiLocalizedUnicodeTagType)' 13. namedColor2TypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccNamedColor2TagTypeVB.icc"))Dim namedColor2Type As New IccNamedColor2TagType()namedColor2Type = CType(iccProfile.GetTag(IccTag.NamedColor2Tag), IccNamedColor2TagType)' 14. parametricCurveTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccParametricCurveTagTypeVB.icc"))Dim parametricCurveType As New IccParametricCurveTagType()parametricCurveType = CType(iccProfile.GetTag(IccTag.GrayTRCTag), IccParametricCurveTagType)' 15. profileSequenceDescTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccProfileSequenceDescriptionTagTypeVB.icc"))Dim profileSequenceDescType As New IccProfileSequenceDescriptionTagType()profileSequenceDescType = CType(iccProfile.GetTag(IccTag.ProfileSequenceDescTag), IccProfileSequenceDescriptionTagType)' 16. responseCurveSet16TypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccResponseCurveSet16TagTypeVB.icc"))Dim responseCurveSet16Type As New IccResponseCurveSet16TagType()responseCurveSet16Type = CType(iccProfile.GetTag(IccTag.OutputResponseTag), IccResponseCurveSet16TagType)' 17. s15Fixed16ArrayTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccS15Fixed16ArrayTagTypeVB.icc"))Dim s15Fixed16ArrayType As New IccS15Fixed16ArrayTagType()s15Fixed16ArrayType = CType(iccProfile.GetTag(IccTag.ChromaticAdaptationTag), IccS15Fixed16ArrayTagType)' 18. signatureTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccSignatureTagTypeVB.icc"))Dim signatureType As New IccSignatureTagType()signatureType = CType(iccProfile.GetTag(IccTag.TechnologyTag), IccSignatureTagType)' 19. textTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccTextTagTypeVB.icc"))Dim textType As New IccTextTagType()textType = CType(iccProfile.GetTag(IccTag.CharTargetTag), IccTextTagType)' 20. u16Fixed16ArrayTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccU16Fixed16ArrayTagTypeVB.icc"))Dim u16Fixed16ArrayType As New IccU16Fixed16ArrayTagType()u16Fixed16ArrayType = CType(iccProfile.GetTag(&H54616741), IccU16Fixed16ArrayTagType)' 21. uint16ArrayTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint16ArrayTagTypeVB.icc"))Dim uint16ArrayType As New IccUint16ArrayTagType()uint16ArrayType = CType(iccProfile.GetTag(&H54616742), IccUint16ArrayTagType)' 22. uint32ArrayTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint32ArrayTagTypeVB.icc"))Dim uint32ArrayType As New IccUint32ArrayTagType()uint32ArrayType = CType(iccProfile.GetTag(&H54616743), IccUint32ArrayTagType)' 23. uint64ArrayTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint64ArrayTagTypeVB.icc"))Dim uint64ArrayType As New IccUint64ArrayTagType()uint64ArrayType = CType(iccProfile.GetTag(&H54616744), IccUint64ArrayTagType)' 24. uint8ArrayTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint8ArrayTagTypeVB.icc"))Dim uint8ArrayType As New IccUint8ArrayTagType()uint8ArrayType = CType(iccProfile.GetTag(&H54616745), IccUint8ArrayTagType)' 25. unknownTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUnknownTagTypeVB.icc"))Dim unknownType As New IccUnknownTagType()unknownType = CType(iccProfile.GetTag(&H54616746), IccUnknownTagType)' 26. viewingConditionsTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccViewingConditionsTagTypeVB.icc"))Dim viewingConditionsType As New IccViewingConditionsTagType()viewingConditionsType = CType(iccProfile.GetTag(IccTag.ViewingConditionsTag), IccViewingConditionsTagType)' 27. xyzTypeiccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccXyzTagTypeVB.icc"))Dim xyzType As New IccXyzTagType()xyzType = CType(iccProfile.GetTag(IccTag.RedMatrixColumnTag), IccXyzTagType)End SubPublic NotInheritable Class LEAD_VARSPublic Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"End Class
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
