Table of Contents

Enum XmpArrayKind

Namespace
Egami.Metadata
Assembly
Egami.dll

The three kinds of XMP array.

public enum XmpArrayKind

Fields

Alternative = 2

Alternatives (rdf:Alt), usually one text per language (xml:lang), such as dc:title.

Bag = 0

An unordered array (rdf:Bag), such as dc:subject, the keywords.

Sequence = 1

An ordered array (rdf:Seq), such as dc:creator.

Examples

XmpData xmp = new()
{
    Title = "Harbour at dawn",
    Creators = ["A. Photographer"],
    Keywords = ["harbour", "Bergen"],
    Rating = 4,
};

// Any property, by namespace URI and local name; structures and arrays nest.
XmpStruct contact = new();
contact.Set(new XmpName(XmpNamespaces.IptcCore, "CiEmailWork"), "photo@example.com");
xmp.Set(new XmpName(XmpNamespaces.IptcCore, "CreatorContactInfo"), contact);
if (xmp.TryGet(new XmpName(XmpNamespaces.DublinCore, "title"), out object? title) && title is XmpArray languages)
{
    languages.SetLanguage("nb-NO", "Havn ved daggry");
}

ReadOnlyMemory<byte> packet = xmp.ToBytes();   // canonical RDF/XML with padding