eSign Image with Metadata signature

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:

How to eSign Image with Metadata signature

This example shows how to sign png image with metadata e-signatures

using (Signature signature = new Signature("sample.png"))
{
    // create Metadata option with predefined Metadata text
    var options = new MetadataSignOptions();
    // Specify different Metadata Signatures and add them to options signature collection
    ushort imgsMetadataId = 41996;
    // Create several Image Metadata signatures with different types
    options
        .Add(new ImageMetadataSignature(imgsMetadataId++, "Mr.Scherlock Holmes")) // String value
        .Add(new ImageMetadataSignature(imgsMetadataId++, DateTime.Now))          // Date Time valu
        .Add(new ImageMetadataSignature(imgsMetadataId++, 123456))                // Integer value
        .Add(new ImageMetadataSignature(imgsMetadataId++, 123.456D))              // Double value
        .Add(new ImageMetadataSignature(imgsMetadataId++, 123.456M))              // Decimal value
        .Add(new ImageMetadataSignature(imgsMetadataId++, 123.456F));             // Float value

    // add these signatures to options
    options.Signatures.AddRange(signatures);
    signature.Sign("SampleSigned.png", options);
}

Advanced Usage Topics

To learn more about document eSign features, please refer to the advanced usage section.

More resources

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online Apps

Along with the full-featured .NET library, we provide simple but powerful free online apps.

To sign PDF, Word, Excel, PowerPoint, and other documents you can use the online apps from the GroupDocs.Signature App Product Family.