This code sample demonstrates how to add a custom tag to an EXIF package.
using(Metadatametadata=newMetadata(Constants.TiffWithExif)){IExifroot=metadata.GetRootPackage()asIExif;if(root!=null){// Set the EXIF package if it's missingif(root.ExifPackage==null){root.ExifPackage=newExifPackage();}// Add a known propertyroot.ExifPackage.Set(newTiffAsciiTag(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(newTiffAsciiTag((TiffTagID)65523,"custom"));metadata.Save(Constants.OutputTiff);}}