GainMapMetadata
The gain map metadata of ISO 21496-1, as the payload of a tmap item holds it (GainMapMetadata, read as libavif's avifParseToneMappedImageBox reads it). Each fraction of the payload is given as its numerator divided by its denominator; raw keeps the payload as stored.
The per-channel arrays hold one value when the metadata is for one channel, which applies to all three, and three, for red, green and blue, when it is multichannel. The headrooms, the gain map minimum and maximum and the offsets are as ISO 21496-1 defines them: the headrooms and the gain map minimum and maximum in log2 units, the offsets and the gamma as plain numbers.
Properties
the HDR headroom of the alternate image, in log2 units.
the offset added to each channel of the alternate image.
the HDR headroom of the base image, in log2 units.
the offset added to each channel of the base image.
1 when one set of values applies to every channel, 3 when each channel has its own.
the gain map maximum of each channel, in log2 units.
the gain map minimum of each channel, in log2 units.
the gamma of each channel's gain map encoding.
the oldest version of the metadata a reader must understand, 0 here: a payload that asks for more is refused.
whether the gain map is applied in the base image's colour space, rather than the alternate image's.
the version of the metadata the writer knew; a reader of version 0 may ignore bytes past the fields below when it is greater.