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

Link copied to clipboard

the HDR headroom of the alternate image, in log2 units.

Link copied to clipboard

the offset added to each channel of the alternate image.

Link copied to clipboard

the HDR headroom of the base image, in log2 units.

Link copied to clipboard

the offset added to each channel of the base image.

Link copied to clipboard

1 when one set of values applies to every channel, 3 when each channel has its own.

Link copied to clipboard

the gain map maximum of each channel, in log2 units.

Link copied to clipboard

the gain map minimum of each channel, in log2 units.

Link copied to clipboard

the gamma of each channel's gain map encoding.

Link copied to clipboard

the oldest version of the metadata a reader must understand, 0 here: a payload that asks for more is refused.

Link copied to clipboard

the payload of the tmap item, as stored. Treat the arrays as read-only.

Link copied to clipboard

whether the gain map is applied in the base image's colour space, rather than the alternate image's.

Link copied to clipboard

the version of the payload, 0.

Link copied to clipboard

the version of the metadata the writer knew; a reader of version 0 may ignore bytes past the fields below when it is greater.

Functions

Link copied to clipboard
open override fun toString(): String