Enum ColorType
#[repr(u8)]
pub enum ColorType
Describes how a pixel is encoded.
Variants
-
Grayscale = 0 1 grayscale sample.
-
Rgb = 2 1 red sample, 1 green sample, 1 blue sample.
-
Indexed = 3 1 sample for the palette index.
-
GrayscaleAlpha = 4 1 grayscale sample, then 1 alpha sample.
-
Rgba = 6 1 red sample, 1 green sample, 1 blue sample, and finally, 1 alpha sample.
Implementations
impl ColorType
fn samples(self) -> usizeReturns the number of samples used per pixel encoded in this way.
fn from_u8(n: u8) -> Option<ColorType>u8 -> Self. Temporary solution until Rust provides a canonical one.
Trait Implementations
impl Clone for ColorType
fn clone(&self) -> Self
impl Copy for ColorType
impl Debug for ColorType
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for ColorType
impl PartialEq for ColorType
fn eq(&self, other: &Self) -> bool