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) -> u8

The number of bits used to store each sample.

fn num_samples(&self) -> u16

The 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

impl StructuralPartialEq for ColorType

Auto Trait Implementations

impl Freeze for ColorType

impl RefUnwindSafe for ColorType

impl Send for ColorType

impl Sync for ColorType

impl Unpin for ColorType

impl UnsafeUnpin for ColorType

impl UnwindSafe for ColorType

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for ColorType where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for ColorType where ST: ?Sized, DT: ?Sized,

impl<T> Any for ColorType where T: 'static + ?Sized,

impl<T> Borrow<T> for ColorType where T: ?Sized,

impl<T> BorrowMut<T> for ColorType where T: ?Sized,

impl<T> CloneToUninit for ColorType where T: Clone,

impl<T> From<T> for ColorType

impl<T> Read<Exclusive, BecauseExclusive> for ColorType where T: ?Sized,

impl<T> ToOwned for ColorType where T: Clone,

impl<T, U> Into<U> for ColorType where U: From<T>,

impl<T, U> TryFrom<U> for ColorType where U: Into<T>,

impl<T, U> TryInto<U> for ColorType where U: TryFrom<T>,