Expand description
XMP serialization for Ultra HDR and related multi-image JPEG formats.
This module handles the Adobe/Google XMP metadata used by Ultra HDR:
hdrgm:*namespace — gain-map numerical parameters (min, max, gamma, offsets, HDR headroom). Generated bygenerate_xmpand friends; parsed byparse_xmp.Container:Directory— GContainer item manifest used by Google Camera and Android Dynamic Depth Format. Emitted bygenerate_xmp_with_items; parsed alongside metadata byparse_xmp_full. Seesuper::containerforContainerItemandItemSemantic.
Physical packet framing belongs to the containing codec.
Enums§
Constants§
- CONTAINER_
NAMESPACE - XMP namespace for GContainer directory.
- HDRGM_
NAMESPACE - XMP namespace for HDR gain-map metadata.
- ITEM_
NAMESPACE - XMP namespace for GContainer item.
- MAX_
XMP_ LENGTH - Upper bound on XMP packet length accepted by
parse_xmp. Guards against CPU exhaustion on crafted inputs.
Functions§
- generate_
gainmap_ xmp - Generate XMP for the gain-map (secondary) JPEG: numeric metadata only (no Container:Directory).
- generate_
primary_ xmp - Generate XMP for the primary JPEG:
Container:Directoryonly. - generate_
primary_ xmp_ with_ items - Generate XMP for the primary JPEG with a custom item list (e.g. for depth-map containers alongside the gain map).
- generate_
xmp - Generate XMP for a 2-item Primary + GainMap Ultra HDR image.
- generate_
xmp_ with_ items - Generate XMP with both numeric metadata and a custom container directory. Used when carrying depth / confidence maps alongside the gain map.
- parse_
xmp - Parse Ultra HDR XMP numeric metadata + optional
Item:Lengthfor the gain map. - parse_
xmp_ full - Parse numeric parameters and container items. Invalid packets yield no
metadata; use
parse_xmpwhen a diagnostic error is required.