Metadata signature for Image document is an electronic signature based on image metadata standard. Most image formats support metadata specification or EXIF. Image metadata is dictionary map with unique whole short identifier in range 0-65535, Some identifiers are reserved by EXIF specification. From signature perspective image metadata may content any hidden value of standard (int,char, string) or custom type (user defined class), be encrypted and decrypted back by known key over Search method.
GroupDocs.Signature provides ImageMetadataSignature class to specify Metadata e-signature for image documents. Image document metadata contains pair with unique identifier Id and its Value. Image document metadata could keep big amount of data that provides ability to keep serialized custom objects with additional encryption in there. See more examples here.
Here are the steps to add metadata signatures into Image with GroupDocs.Signature:
Create new instance of Signature class and pass source document path as a constructor parameter.
This example shows how to sign png image with metadata e-signatures
Signaturesignature=newSignature("sample.jpg");// create Metadata option with predefined Metadata text
MetadataSignOptionsoptions=newMetadataSignOptions();// Specify different Metadata Signatures and add them to options signature collection
intimgsMetadataId=41996;// Create several Image Metadata signatures with different types
ImageMetadataSignature[]signatures=newImageMetadataSignature[]{newImageMetadataSignature(imgsMetadataId++,123456),// int
newImageMetadataSignature(imgsMetadataId++,"Mr.Scherlock Holmes"),// string
newImageMetadataSignature(imgsMetadataId++,newDate()),// date time
newImageMetadataSignature(imgsMetadataId++,123.456),//decimal value
};options.getSignatures().addRange(signatures);// sign document to file
signature.sign("SampleSigned.jpg",options);
More resources
Advanced Usage Topics
To learn more about document eSign features, please refer to the advanced usage section.
GitHub Examples
You may easily run the code above and see the feature in action in our GitHub examples:
Along with full-featured .NET library we provide simple, but powerful free Apps. You are welcome to eSign PDF, Word, Excel, PowerPoint documents with free to use online GroupDocs Signature App.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.