#[non_exhaustive]pub enum LumaCoefficients {
FromSourcePrimaries,
Bt709,
Bt601,
Bt2020,
Custom([f32; 3]),
}Expand description
Luminance weights used when converting RGB → Gray.
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.
FromSourcePrimaries
Derive linear luminance weights from the source RGB primaries (Bt709, DisplayP3, Bt2020, AdobeRgb).
Bt709
ITU-R BT.709 (0.2126, 0.7152, 0.0722).
Bt601
ITU-R BT.601 (0.299, 0.587, 0.114).
Bt2020
ITU-R BT.2020 (0.2627, 0.6780, 0.0593).
Custom([f32; 3])
Custom linear luminance weights [Yr, Yg, Yb].
Trait Implementations§
Source§impl Clone for LumaCoefficients
impl Clone for LumaCoefficients
Source§fn clone(&self) -> LumaCoefficients
fn clone(&self) -> LumaCoefficients
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LumaCoefficients
Source§impl Debug for LumaCoefficients
impl Debug for LumaCoefficients
Source§impl Default for LumaCoefficients
impl Default for LumaCoefficients
Source§fn default() -> LumaCoefficients
fn default() -> LumaCoefficients
Returns the “default value” for a type. Read more
Source§impl PartialEq for LumaCoefficients
impl PartialEq for LumaCoefficients
impl StructuralPartialEq for LumaCoefficients
Auto Trait Implementations§
impl Freeze for LumaCoefficients
impl RefUnwindSafe for LumaCoefficients
impl Send for LumaCoefficients
impl Sync for LumaCoefficients
impl Unpin for LumaCoefficients
impl UnsafeUnpin for LumaCoefficients
impl UnwindSafe for LumaCoefficients
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more