Generic Typed Metadata Authoring

Custom structured XMP (0.8.26)

Explicit bounded custom Struct/Bag/Seq/LangAlt declarations share whole-tree validation, transactional creation/editing and portable transfer. Authoring and typed editing contracts are 3, structured editing is 2, validation is 2 and the new declaration contract is 1. Opt-in decode retains kinds and exact custom text; default flattening remains. Option layouts grow within unfrozen ABI 4: rebuild with matching headers/binaries. Snapshot wire 1 and prepared patch contract 2 remain. See Structured XMP creation and editing.

ICC authoring and serialization (0.8.25)

ICC authoring/editing contracts 2 and canonical ICC serialization contract 1 support fresh host-provided header/tag data, transactional exact-key changes, checked measure/write, deterministic layout and existing ICC carrier paths. Profile IDs clear by default; dirty deletion intent is retained before transfer filtering. Clean transfer compatibility remains, with corrected fixed-point illuminant encoding. ABI 4 and existing layouts are retained. Full RDF authoring remains open; ICC class/tag/color semantics stay host-owned. See ICC creation, editing and canonical serialization for the complete contract.

openmeta/metadata_authoring.h provides the C++ contract-2 construction path for applications that know their exact writable keys. It complements the simpler logical-field Creation API.

The transactional builder accepts borrowed typed entries for EXIF/TIFF and DNG-style tags, XMP properties, and IPTC-IIM datasets. Keys and values are deep-copied into a finalized MetaStore. Unknown/private EXIF tags and custom XMP namespace URIs do not require registry changes.

const std::array entries = {
    openmeta::MetadataAuthoringEntry {
        openmeta::make_exif_tag_key_view("ifd0", 0x010F),
        openmeta::make_value_view_text(
            "Example Camera", openmeta::TextEncoding::Ascii),
        openmeta::WireType { openmeta::WireFamily::Tiff, 2 },
        15,
    },
    openmeta::MetadataAuthoringEntry {
        openmeta::make_xmp_property_key_view(
            "urn:example:capture:1.0/", "Gain[1]"),
        openmeta::make_value_view_text(
            "1.25", openmeta::TextEncoding::Utf8),
    },
};

openmeta::MetaStore store;
const auto result = openmeta::create_metadata_store(entries, &store);

The output changes only after the complete request passes resource, structural, and enabled schema validation. Duplicate keys are preserved by default; known EXIF singletons are schema-checked. MetaStore::reserve() is also available for trusted low-level build paths and honors active resource ceilings.

Detached validation

validate_entry() and validate_store() check value shape, rational denominators, known TIFF/EXIF/GPS/DNG IFD/type/count rules, duplicate singletons, XMP URI/path syntax, resource limits, and optional image/CFA/color relationships. Unknown/private EXIF tags remain allowed by default.

Custom XMP currently covers safe scalar and indexed properties. Emit them with dump_xmp_portable() and PreserveCustom. Full arbitrary RDF structures and caller-selected prefix spelling remain outside v1.

Structural validity does not prove image correctness. The host remains authoritative for dimensions, channel layout, CFA, levels, color transforms, and frame-varying capture facts.

See the complete contract in docs/generic_authoring.md.

Standard field validation in 0.5.10

All 64 reverse targets missing fixed schemas in the 0.5.9 audit now have native IFD/type/count/singleton rules. Five registered Interop fields and three structural pointers are recognized. InteroperabilityIndex no longer fails merely because GPS reuses its numeric ID. See Standard EXIF Authoring Inventory.

Shared checks cover capture enums, Flash, LightSource, sensitivity values, rationals/sentinels, lens and subject arrays, GPS references/bearings, ASCII text and encoded GPS prefixes. GainControl remains SHORT per its detailed definition. Malformed known values formerly accepted as unknown can now fail default construction, typed editing or canonical serialization. Invalid native values leave eligible retained XMP available when existing-XMP output is enabled.

Detached stores do not acquire mandatory complete-file companions or translator text/precision limits. Subsecond text can exceed nine digits and retain spaces. Native APEX denominators may be negative but not zero. Native focal-plane units 1–5 remain accepted; reverse translation retains its narrower 2/3 contract. Lens 0/0 remains restricted to the two unknown aperture slots. GPS JIS, Unicode and undefined-code bodies stay opaque after prefix validation; ASCII bodies must be 7-bit. Pointer schemas check type/count, not target existence.

Unknown/private policy, host synchronization, ABI 3 and snapshot v1 layout remain unchanged. These rules do not establish full EXIF file conformance.

Shared target-profile validation in 0.8.13

Opt-in primary-image checks share host facts across creation, typed editing and canonical serialization. Default detached behavior remains available. Public option layouts grow under unfrozen ABI 4; rebuild matching headers and binaries. See Target-profile validation for the contract and limitations.

Structured XMP transactions in 0.8.14

Bounded whole-record, array-item and language-alternative operations use canonical portable-XMP paths and one transactional typed edit. ABI4 and existing layouts remain unchanged. See Structured XMP creation and editing for scopes and limits.