Struct image::Luma [−][src]
Expand description
Grayscale colors
Trait Implementations
type Subpixel = T
type Subpixel = T
The underlying subpixel type.
The number of channels of this pixel type.
ColorType for this pixel format
Returns the components as a mutable slice
Returns the channels of this pixel as a 4 tuple. If the pixel has less than 4 channels the remainder is filled with the maximum value Read more
Construct a pixel from the 4 channels a, b, c and d. If the pixel does not contain 4 channels the extra are ignored. Read more
Returns a view into a slice. Read more
Returns mutable view into a mutable slice. Read more
Convert this pixel to luma with an alpha channel
Apply the function f
to each channel of this pixel.
Apply the function f
to each channel of this pixel.
fn map_with_alpha<F, G>(&self, f: F, g: G) -> Luma<T> where
F: FnMut(T) -> T,
G: FnMut(T) -> T,
fn map_with_alpha<F, G>(&self, f: F, g: G) -> Luma<T> where
F: FnMut(T) -> T,
G: FnMut(T) -> T,
Apply the function f
to each channel except the alpha channel.
Apply the function g
to the alpha channel. Read more
Apply the function f
to each channel except the alpha channel.
Apply the function g
to the alpha channel. Works in-place. Read more
Apply the function f
to each channel of this pixel and
other
pairwise. Read more
Apply the function f
to each channel of this pixel and
other
pairwise. Works in-place. Read more
Blend the color of a given pixel into ourself, taking into account alpha channels
please use CHANNEL_COUNT associated constant
Returns the number of channels of this pixel type.
please use COLOR_MODEL associated constant
please use COLOR_TYPE associated constant
Returns the ColorType for this pixel format
Apply the function f
to each channel except the alpha channel.
Auto Trait Implementations
impl<T> RefUnwindSafe for Luma<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Luma<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more