Interface GainMapOptions

Options of the GainMap constructor: per channel values can be one number for all three or [r, g, b]

interface GainMapOptions {
    gainMapMax?: number | number[];
    gainMapMin?: number | number[];
    gamma?: number | number[];
    hdrCapacityMax?: number;
    hdrCapacityMin?: number;
    offsetHDR?: number | number[];
    offsetSDR?: number | number[];
    useBaseColorSpace?: boolean;
}

Properties

gainMapMax?: number | number[]

log2 of the boost of the map's value 255 (2: 4 times as bright). Default: 2

gainMapMin?: number | number[]

log2 of the boost of the map's value 0 (-1: half as bright). Default: 0

gamma?: number | number[]

the gamma the map's values are stored with. Default: 1

hdrCapacityMax?: number

log2 of the display headroom at which it applies fully. Default: gainMapMax's largest value

hdrCapacityMin?: number

log2 of the display headroom from which on the map starts to apply. Default: 0

offsetHDR?: number | number[]

subtracted from the HDR result. Default: 1/64

offsetSDR?: number | number[]

added to the SDR image's linear values before the boost (keeps black from being boosted forever). Default: 1/64

useBaseColorSpace?: boolean

whether the boost applies in the SDR image's color space (false: in the HDR image's). Default: true