1

I'm searching for a way in C# to not only extract XMP data from e.g. an image but also change/ update values and store everything. Right now I have two major problems:

  1. registering new namespaces
  2. storing everything back to the image I'm using both the Metadata-Extractor as well as XMP.core.net in my solution

Reading xmp:

var xmpDirectory = ImageMetadataReader.ReadMetadata(pathToMyJpgImage).OfType<XmpDirectory>().FirstOrDefault();
IXmpMeta xmp = xmpDirectory.XmpMeta;

The xmp object is fine, I can update known properties in known namespaces. Like this:

xmp.SetProperty("http://ns.adobe.com/xap/1.0/", "CreateDate", "123");

But I have not found a way to register new namespace via I guess the XmpSchemaRegistry.

Question 1: is it possible to register new namespaces in the xmp instance - and how?

Question 2: I have not found a way to store everything in the end. So how do I apply my changes to the image???

Sorry, first time I'm dealing with meta data of images... Hence I guess lets of silly questions.

Vegetico
  • 93
  • 8

0 Answers0