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. 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:\Users\Public\Documents\LEADTOOLS Images";
}
Imports Leadtools
Imports Leadtools.ColorConversion
Public Sub GetIccProfileTagsExample()
' Note that the tag types shoule be the same as the ones used in the Example above.
' 1. chromaticityType
Dim iccProfile As New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccChromaticityTagTypeVB.icc"))
Dim chromaticityType As New IccChromaticityTagType()
chromaticityType = CType(iccProfile.GetTag(IccTag.ChromaticityTag), IccChromaticityTagType)
' 2. colorantOrderType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccColorantOrderTagTypeVB.icc"))
Dim colorantOrderType As New IccColorantOrderTagType()
colorantOrderType = CType(iccProfile.GetTag(IccTag.ColorantOrderTag), IccColorantOrderTagType)
' 3. colorantTableType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccColorantTableTagTypeVB.icc"))
Dim colorantTableType As New IccColorantTableTagType()
colorantTableType = CType(iccProfile.GetTag(IccTag.ColorantTableTag), IccColorantTableTagType)
' 4. curveType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccCurveTagTypeVB.icc"))
Dim curveType As New IccCurveTagType()
curveType = CType(iccProfile.GetTag(IccTag.GrayTRCTag), IccCurveTagType)
' 5. dataType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccDataTagTypeVB.icc"))
Dim dataType As New IccDataTagType()
dataType = CType(iccProfile.GetTag(&H64617461), IccDataTagType)
' 6. dateTimeType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccDateTimeTagTypeVB.icc"))
Dim dateTimeType As New IccDateTimeTagType()
dateTimeType = CType(iccProfile.GetTag(IccTag.CalibrationDateTimeTag), IccDateTimeTagType)
' 7. lut16Type
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTable16TagTypeVB.icc"))
Dim lut16Type As New IccLookupTable16TagType()
lut16Type = CType(iccProfile.GetTag(IccTag.BToA0Tag), IccLookupTable16TagType)
' 8. lut8Type
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTable8TagTypeVB.icc"))
Dim lut8Type As New IccLookupTable8TagType()
lut8Type = CType(iccProfile.GetTag(IccTag.BToA1Tag), IccLookupTable8TagType)
' 9. lutAToBType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTableAToBTagTypeVB.icc"))
Dim lutAToBType As New IccLookupTableAToBTagType()
lutAToBType = CType(iccProfile.GetTag(IccTag.AToB2Tag), IccLookupTableAToBTagType)
' 10. lutBToAType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccLookupTableBToATagTypeVB.icc"))
Dim lutBToAType As New IccLookupTableBToATagType()
lutBToAType = CType(iccProfile.GetTag(IccTag.BToA2Tag), IccLookupTableBToATagType)
' 11. measurementType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccMeasurementTagTypeVB.icc"))
Dim measurementType As New IccMeasurementTagType()
measurementType = CType(iccProfile.GetTag(IccTag.MeasurementTag), IccMeasurementTagType)
' 12. multiLocalizedUnicodeType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccMultiLocalizedUnicodeTagTypeVB.icc"))
Dim multiLocalizedUnicodeType As New IccMultiLocalizedUnicodeTagType()
multiLocalizedUnicodeType = CType(iccProfile.GetTag(IccTag.DeviceModelDescTag), IccMultiLocalizedUnicodeTagType)
' 13. namedColor2Type
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccNamedColor2TagTypeVB.icc"))
Dim namedColor2Type As New IccNamedColor2TagType()
namedColor2Type = CType(iccProfile.GetTag(IccTag.NamedColor2Tag), IccNamedColor2TagType)
' 14. parametricCurveType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccParametricCurveTagTypeVB.icc"))
Dim parametricCurveType As New IccParametricCurveTagType()
parametricCurveType = CType(iccProfile.GetTag(IccTag.GrayTRCTag), IccParametricCurveTagType)
' 15. profileSequenceDescType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccProfileSequenceDescriptionTagTypeVB.icc"))
Dim profileSequenceDescType As New IccProfileSequenceDescriptionTagType()
profileSequenceDescType = CType(iccProfile.GetTag(IccTag.ProfileSequenceDescTag), IccProfileSequenceDescriptionTagType)
' 16. responseCurveSet16Type
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccResponseCurveSet16TagTypeVB.icc"))
Dim responseCurveSet16Type As New IccResponseCurveSet16TagType()
responseCurveSet16Type = CType(iccProfile.GetTag(IccTag.OutputResponseTag), IccResponseCurveSet16TagType)
' 17. s15Fixed16ArrayType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccS15Fixed16ArrayTagTypeVB.icc"))
Dim s15Fixed16ArrayType As New IccS15Fixed16ArrayTagType()
s15Fixed16ArrayType = CType(iccProfile.GetTag(IccTag.ChromaticAdaptationTag), IccS15Fixed16ArrayTagType)
' 18. signatureType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccSignatureTagTypeVB.icc"))
Dim signatureType As New IccSignatureTagType()
signatureType = CType(iccProfile.GetTag(IccTag.TechnologyTag), IccSignatureTagType)
' 19. textType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccTextTagTypeVB.icc"))
Dim textType As New IccTextTagType()
textType = CType(iccProfile.GetTag(IccTag.CharTargetTag), IccTextTagType)
' 20. u16Fixed16ArrayType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccU16Fixed16ArrayTagTypeVB.icc"))
Dim u16Fixed16ArrayType As New IccU16Fixed16ArrayTagType()
u16Fixed16ArrayType = CType(iccProfile.GetTag(&H54616741), IccU16Fixed16ArrayTagType)
' 21. uint16ArrayType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint16ArrayTagTypeVB.icc"))
Dim uint16ArrayType As New IccUint16ArrayTagType()
uint16ArrayType = CType(iccProfile.GetTag(&H54616742), IccUint16ArrayTagType)
' 22. uint32ArrayType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint32ArrayTagTypeVB.icc"))
Dim uint32ArrayType As New IccUint32ArrayTagType()
uint32ArrayType = CType(iccProfile.GetTag(&H54616743), IccUint32ArrayTagType)
' 23. uint64ArrayType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint64ArrayTagTypeVB.icc"))
Dim uint64ArrayType As New IccUint64ArrayTagType()
uint64ArrayType = CType(iccProfile.GetTag(&H54616744), IccUint64ArrayTagType)
' 24. uint8ArrayType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUint8ArrayTagTypeVB.icc"))
Dim uint8ArrayType As New IccUint8ArrayTagType()
uint8ArrayType = CType(iccProfile.GetTag(&H54616745), IccUint8ArrayTagType)
' 25. unknownType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccUnknownTagTypeVB.icc"))
Dim unknownType As New IccUnknownTagType()
unknownType = CType(iccProfile.GetTag(&H54616746), IccUnknownTagType)
' 26. viewingConditionsType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccViewingConditionsTagTypeVB.icc"))
Dim viewingConditionsType As New IccViewingConditionsTagType()
viewingConditionsType = CType(iccProfile.GetTag(IccTag.ViewingConditionsTag), IccViewingConditionsTagType)
' 27. xyzType
iccProfile = New IccProfileExtended(Path.Combine(LEAD_VARS.ImagesDir, "IccXyzTagTypeVB.icc"))
Dim xyzType As New IccXyzTagType()
xyzType = CType(iccProfile.GetTag(IccTag.RedMatrixColumnTag), IccXyzTagType)
End Sub
Public NotInheritable Class LEAD_VARS
Public 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