Enum adi::screen::ColorChannels
source · pub enum ColorChannels {
Show 13 variants
Sgrayscale,
Srgb,
Srgba,
Sbgr,
Sbgra,
Lgrayscale,
Lrgb,
Lrgba,
Lbgr,
Lbgra,
Lhsv,
Lhsva,
YCbCr,
}
Expand description
The format for the color channels of the Video
.
Variants
Sgrayscale
Grayscale color format, 1 channel (stored in red channel).
Srgb
sRGB color format, 3 channels.
Srgba
sRGBA color format, 4 channels.
Sbgr
sBGR color format, 3 channels.
Sbgra
sBGRA color format, 4 channels.
Lgrayscale
Linear Grayscale, 1 channel (red).
Lrgb
Linear RGB color format, 3 channels.
Lrgba
Linear RGBA color format, 4 channels.
Lbgr
Linear BGR color format, 3 channels.
Lbgra
Linear BGRA color format, 4 channels.
Lhsv
Linear HSB/HSV colorspace, 3 channels.
Lhsva
Linear HSBA/HSVA, 4 channels.
YCbCr
YCbCr color format, 3 channels
Implementations
sourceimpl ColorChannels
impl ColorChannels
sourcepub fn from(self, from: ColorChannels, p: [u8; 4]) -> [u8; 4]
pub fn from(self, from: ColorChannels, p: [u8; 4]) -> [u8; 4]
Convert a pixel to this format from another.
sourcepub fn n_channels(self) -> usize
pub fn n_channels(self) -> usize
Return the number of channels.
Trait Implementations
sourceimpl Clone for ColorChannels
impl Clone for ColorChannels
sourcefn clone(&self) -> ColorChannels
fn clone(&self) -> ColorChannels
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Default for ColorChannels
impl Default for ColorChannels
sourcefn default() -> ColorChannels
fn default() -> ColorChannels
Returns the “default value” for a type. Read more
sourceimpl PartialEq<ColorChannels> for ColorChannels
impl PartialEq<ColorChannels> for ColorChannels
sourcefn eq(&self, other: &ColorChannels) -> bool
fn eq(&self, other: &ColorChannels) -> bool
impl Copy for ColorChannels
impl StructuralPartialEq for ColorChannels
Auto Trait Implementations
impl RefUnwindSafe for ColorChannels
impl Send for ColorChannels
impl Sync for ColorChannels
impl Unpin for ColorChannels
impl UnwindSafe for ColorChannels
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more