#[repr(u8)]
#[non_exhaustive]
pub enum Transfer {
    Bt709,
    Bt470M,
    Bt601,
    Smpte240,
    Linear,
    Srgb,
    Bt2020_10bit,
    Bt2020_12bit,
    Smpte2084,
    Bt2100Pq,
    Bt2100Hlg,
    Bt2100Scene,
}
Expand description

Transfer functions from encoded chromatic samples to physical quantity.

Ignoring viewing environmental effects, this describes a pair of functions that are each others inverse: An electro-optical transfer (EOTF) and opto-electronic transfer function (OETF) that describes how scene lighting is encoded as an electric signal. These are applied to each stimulus value.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

Bt709

Non-linear electrical data of Bt.709

Bt470M

Bt601

Non-linear electrical data of Bt.601

Smpte240

Non-linear electrical data of Smpte-240

Linear

Linear color in display luminance.

Srgb

Non-linear electrical data of Srgb

Technically, we’re implementing scRGB since we handle negative primaries just well enough.

Bt2020_10bit

Non-linear electrical data of Bt2020 that was 10-bit quantized

Bt2020_12bit

Non-linear electrical data of Bt2020 that was 12-bit quantized FIXME(color): not yet supported, panics on use.

Smpte2084

Non-linear electrical data of Smpte-2048

Bt2100Pq

Another name for Smpte2084. FIXME(color): not yet supported, panics on use.

Bt2100Hlg

Non-linear electrical data of Bt2100 Hybrid-Log-Gamma. FIXME(color): not yet supported, panics on use.

Bt2100Scene

Linear color in scene luminance of Bt2100. This is perfect for an artistic composition pipeline. The rest of the type system will ensure this is not accidentally and unwittingly mixed with Linear but otherwise this is treated as Linear. You might always transmute. FIXME(color): not yet supported, panics on use.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.