pub struct RgbToGrayMask {
pub r_offset: usize,
pub g_offset: usize,
pub b_offset: usize,
}Expand description
RGB-to-gray mask: weighted sum of R, G, B channels.
Port of C++ rgb_to_gray_mask_u8<R, G, B>.
Uses luminance weights: R77 + G150 + B*29 >> 8.
Fields§
§r_offset: usize§g_offset: usize§b_offset: usizeImplementations§
Trait Implementations§
Source§impl Clone for RgbToGrayMask
impl Clone for RgbToGrayMask
Source§fn clone(&self) -> RgbToGrayMask
fn clone(&self) -> RgbToGrayMask
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl MaskFunction for RgbToGrayMask
impl MaskFunction for RgbToGrayMask
impl Copy for RgbToGrayMask
Auto Trait Implementations§
impl Freeze for RgbToGrayMask
impl RefUnwindSafe for RgbToGrayMask
impl Send for RgbToGrayMask
impl Sync for RgbToGrayMask
impl Unpin for RgbToGrayMask
impl UnwindSafe for RgbToGrayMask
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