Struct palette::encoding::gamma::Gamma [−][src]
Gamma encoding.
Gamma encoding or gamma correction is used to transform the intensity
values to either match a non-linear display, like CRT, or to prevent
banding among the darker colors. GammaRgb
represents a gamma corrected
RGB color, where the intensities are encoded using the following power-law
expression: V γ (where V is the intensity value an γ is the encoding
gamma).
The gamma value is stored as a simple type that represents an f32
constant.
Trait Implementations
impl<S: Copy, N: Copy + Number> Copy for Gamma<S, N>
[src]
impl<S: Copy, N: Copy + Number> Copy for Gamma<S, N>
impl<S: Clone, N: Clone + Number> Clone for Gamma<S, N>
[src]
impl<S: Clone, N: Clone + Number> Clone for Gamma<S, N>
fn clone(&self) -> Gamma<S, N>
[src]
fn clone(&self) -> Gamma<S, N>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<S: Debug, N: Debug + Number> Debug for Gamma<S, N>
[src]
impl<S: Debug, N: Debug + Number> Debug for Gamma<S, N>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<S: PartialEq, N: PartialEq + Number> PartialEq for Gamma<S, N>
[src]
impl<S: PartialEq, N: PartialEq + Number> PartialEq for Gamma<S, N>
fn eq(&self, other: &Gamma<S, N>) -> bool
[src]
fn eq(&self, other: &Gamma<S, N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Gamma<S, N>) -> bool
[src]
fn ne(&self, other: &Gamma<S, N>) -> bool
This method tests for !=
.
impl<S: Eq, N: Eq + Number> Eq for Gamma<S, N>
[src]
impl<S: Eq, N: Eq + Number> Eq for Gamma<S, N>
impl<S: RgbSpace, N: Number> RgbStandard for Gamma<S, N>
[src]
impl<S: RgbSpace, N: Number> RgbStandard for Gamma<S, N>
type Space = S
The RGB color space.
type TransferFn = GammaFn<N>
The transfer function for the color components.
impl<Wp: WhitePoint, N: Number> LumaStandard for Gamma<Wp, N>
[src]
impl<Wp: WhitePoint, N: Number> LumaStandard for Gamma<Wp, N>
type WhitePoint = Wp
The white point of the color space.
type TransferFn = GammaFn<N>
The transfer function for the luminance component.