ImageGear v26.3 - Updated
Developer Guide / How to Work with ... / Common Operations / Manipulating Image Data / Metadata / Simplified Metadata API / Create New Metadata Structures
In This Topic
    Create New Metadata Structures
    In This Topic

    If a metadata structure does not exist in the image, the application can create it.

    For example:

    C#

    igPage.Metadata.IPTC = new ImGearIPTCMetadata();
    

    VB.NET

    igPage.Metadata.IPTC = New ImGearIPTCMetadata()
    

    However, the page's target metadata format should support the metadata tree being created. For example, if a page was loaded from a BMP image, you cannot add IPTC metadata to it. In order to do that, you should set target metadata format to one that supports the metadata structure you are going to add. Use ImGearMetadataHead.SetTargetFormat Method and ImGearMetadataHead.GetTargetFormat Method to control the target metadata format of the page. Note that changing the target metadata format erases all data from the previous format.