The TIFF Property, EXIF Property, IPTC Property and XMP Property of ImGearMetadataHead Class, defined in the ImageGear23.Core assembly, use ImGearFormatMetadata Class type. ImGearFormatMetadata Class does not have any public members. If the application uses Simplified Metadata API, it shall cast TIFF, EXIF, IPTC and XMP properties to actual classes ImGearTIFFMetadata Class, ImGearEXIFMetadata Class, ImGearIPTCMetadata Class and ImGearXMPMetadataRoot Class, respectively. These classes are defined in the ImageGear23.Formats.SimplifiedMetadata assembly. The following two examples demonstrate this:
C# |
Copy Code |
---|---|
using ImageGear.Formats.XMP; ImGearPage page; // Load an image into ImGearPage // a String description = "<Empty>"; if (imGearPage.Metadata.XMP != null) { ImGearXMPMetadataRoot xmp = imGearPage.Metadata.XMP as ImGearXMPMetadataRoot; if ((xmp.DublinCore != null) && (xmp.DublinCore.Description != null) && (xmp.DublinCore.Description.Default != null)) description = xmp.DublinCore.Description.Default; } |
VB.NET |
Copy Code |
---|---|
Imports ImageGear.Formats.XMP Dim imGearPage As ImGearPage ' Load an image into ImGearPage ' ... imGearPage = igPage Dim description As String = "<Empty>" If imGearPage.Metadata.XMP IsNot Nothing Then Dim xmp As ImGearXMPMetadataRoot = imGearPage.Metadata.XMP If ((xmp.DublinCore IsNot Nothing) And (xmp.DublinCore.Description IsNot Nothing) And (xmp.DublinCore.Description.Default IsNot Nothing)) Then description = xmp.DublinCore.Description.Default End If End If |