Extensible Metadata Platform (XMP) is an XML-based standard for storage and interchange of metadata, developed by Adobe Systems, Inc. The standard defines the rules for storage and processing of metadata, and provides a number of schemas for storage of information that is typically associated with images and documents, such as Title, Author, Creation date/time, Rating, etc. Applications can add custom schemas to store additional information.
XMP metadata can be attached to files of various formats, such as TIFF, PNG, GIF, DNG, JPEG, PSD, PDF, PostScript, JP2 and JPX.
ImageGear provides the following ways for working with XMP metadata:
- Accessing XMP properties via the ImageGear Metadata API. In this mode, ImageGear decodes XMP properties and accumulates them in the metadata structure, which is attached to the ImGearPage object when working with the raster formats or ImGearDocument object when working with PDF or PostScript. Then, the application can access individual properties in one of the two ways:
- General Metadata API. In this mode, the application works with a tree structure containing XMP properties. This mode supports arbitrary XMP schemas. However, working in this mode requires that the application developer has some knowledge of both the XMP standard and particular schemas. See Accessing XMP Tags via the General Metadata API for information.
- Simplified Metadata API. In this mode, the application works with classes that allow simple access to particular properties, without the need to know details of the XMP standard, and with only a minimal knowledge of XMP schemas. Simplified API only supports schemas that are known to ImageGear. See the description of ImGearXMPMetadataRoot Class for a list of supported schemas. See Accessing XMP Tags via the Simplified Metadata API for information.
- Working with unprocessed XMP metadata. In this mode, ImageGear passes XMP to the application as a single byte array containing XMP tags. The application can parse this array using a third party XML parser. On the writing side, the application prepares an array containing XMP tags, and passes it to ImageGear. Unprocessed XMP metadata can be accessed via the metadata structure of the containing format, such as TIFF or JPEG, using General Metadata API. The metadata tree will contain only the XMP tag, containing a binary array.
By default, ImageGear parses the XMP stream into its metadata structure, and does not provide the Raw XMP stream. If you don't want ImageGear to parse the XMP stream, and prefer to access the unprocessed XMP stream, set ImGearLoadOptions.ParseXMP Property to false.
During saving, if an XMP tag contains a tree, ImageGear serializes the tree into an XMP stream. Alternatively, if XMP tag contains a byte array, ImageGear saves this array verbatim.
This section provides information about the following: