Enum ColorType
#[non_exhaustive]
pub enum ColorType
An enumeration over supported color types and their bit depths
Variants
-
Gray(u8) Pixel is grayscale
-
RGB(u8) Pixel contains R, G and B channels
-
Palette(u8) Pixel is an index into a color palette
-
GrayA(u8) Pixel is grayscale with an alpha channel
-
RGBA(u8) Pixel is RGB with an alpha channel
-
CMYK(u8) Pixel is CMYK
-
CMYKA(u8) Pixel is CMYK with an alpha channel
-
YCbCr(u8) Pixel is YCbCr
-
Lab(u8) Pixel is CIE Lab* (ICC LAb)
-
Multiband { bit_depth: u8, num_samples: u16 } Pixel has multiple bands/channels
Implementations
impl ColorType
fn bit_depth(&self) -> u8The number of bits used to store each sample.
fn num_samples(&self) -> u16The number of samples in each representation of a single color.
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 Hash for ColorType
fn hash<__H: Hasher>(&self, state: &mut __H)
impl PartialEq for ColorType
fn eq(&self, other: &Self) -> bool