ExifDictionaryBasePackageSet Method
Adds or replaces the specified tag.

Namespace: GroupDocs.Metadata.Standards.Exif
Assembly: GroupDocs.Metadata (in GroupDocs.Metadata.dll) Version: 21.8
Syntax
public void Set(
	TiffTag tag
)

Parameters

tag
Type: GroupDocs.Metadata.Formats.ImageTiffTag
The tag to set.
Examples
This code sample demonstrates how to add a custom tag to an EXIF package.
C#
using (Metadata metadata = new Metadata(Constants.TiffWithExif))
{
    IExif root = metadata.GetRootPackage() as IExif;
    if (root != null)
    {
        // Set the EXIF package if it's missing
        if (root.ExifPackage == null)
        {
            root.ExifPackage = new ExifPackage();
        }

        // Add a known property
        root.ExifPackage.Set(new TiffAsciiTag(TiffTagID.Artist, "test artist"));

        // Add a fully custom property (which is not described in the EXIF specification).
        // Please note that the chosen ID may intersect with the IDs used by some third party tools.
        root.ExifPackage.Set(new TiffAsciiTag((TiffTagID)65523, "custom"));

        metadata.Save(Constants.OutputTiff);
    }
}
See Also