GroupDocs.Metadata for .NET

Adding Metadata To WEBP In C#

Add custom metadata properties to a wide range of business documents, images, audio & video file formats using GroupDocs.Metadata for .NET API

Steps for adding Metadata to Webp in C#

GroupDocs.Metadata makes it easy for .NET developers to add metadata details to WEBP files from within their applications by implementing a few easy steps.

  1. Load the WEBP file to be updated.
  2. Specify a predicate that will be used to add metadata properties.
  3. Pass the predicate to the Metadata.AddProperties method.
  4. Save the changes.
Copy
// load the file in an instance of Metadata class
using (var metadata = new GroupDocs.Metadata.Metadata("input.webp"))
{
    // add a property containing the content author
    var affected = metadata.AddProperties(p => p.Tags.Contains(
      GroupDocs.Metadata.Tagging.Tags.Person.Creator), 
      new GroupDocs.Metadata.Common.PropertyValue("test content author"));
    
    // process operation results
    Console.WriteLine("Affected properties: {0}", affected);
    
    // save the file with updated metadata
    metadata.Save("output.webp");
}
dotnet add package GroupDocs.Metadata
click to copy
copied
More examples Documentation

Document Metadata Management

Our robust API simplifies the management of document metadata. Seamlessly access, edit, and manipulate a variety of document properties to enhance organization and searchability.

Metadata Manipulation Features

Metadata Control

Easily retrieve and process metadata from documents. Gain valuable insights into properties such as author, creation date, and more.

Metadata Editing

Directly modify document metadata. Update properties to improve organization, boost searchability, and ensure accurate information.

Advanced Metadata Management

Execute complex operations on document metadata. Efficiently add custom properties, remove unnecessary data, and maintain data consistency.

How to Add Custom Metadata to a TIFF Image

This example demonstrates how to insert a custom tag into an EXIF package.

C#


    using (Metadata metadata = new Metadata("input.tiff"))
    {
        IExif root = metadata.GetRootPackage() as IExif;
        if (root != null)
        {
            //  Assign the EXIF package if it is missing.
            if (root.ExifPackage == null)
            {
                root.ExifPackage = new ExifPackage();
            }

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

            //  Include a fully custom property that is not part of the EXIF specification.
            //  Be aware that the chosen ID may conflict with IDs used by some third-party tools.
            root.ExifPackage.Set(new TiffAsciiTag((TiffTagID)65523, "custom"));

            metadata.Save("output.tiff");
        }
    }

About GroupDocs.Metadata for .NET API

GroupDocs.Metadata for .NET offers an advanced set of metadata management and manipulation features, allowing .NET programmers to easily view, edit, delete, find, compare, swap and export metadata information from images and document formats without using any external software. Add metadata details to PDF, Microsoft Word, Excel, PowerPoint, Outlook, OneNote, Visio, Project, AutoCAD, Archive and Multimedia file formats with additional support to perform metadata operations on any GroupDocs.Metadata-based applications with true flexibility
Learn more
About illustration

Ready to get started?

Download GroupDocs.Metadata for free or get a trial license for full access!

Adding Metadata Properties To Other File Formats

Multi format documents and images metadata addition API for GroupDocs.Metadata. Retrieve metadata of some of the popular file formats as stated below.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English