Enum afi::ColorChannels
source · #[repr(u8)]
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§
source§impl 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§
source§impl Clone for ColorChannels
impl Clone for ColorChannels
source§fn clone(&self) -> ColorChannels
fn clone(&self) -> ColorChannels
Returns a copy 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 Default for ColorChannels
impl Default for ColorChannels
source§fn default() -> ColorChannels
fn default() -> ColorChannels
Returns the “default value” for a type. Read more