pub enum ColorType {
Gray(u8),
RGB(u8),
Palette(u8),
GrayA(u8),
RGBA(u8),
CMYK(u8),
YCbCr(u8),
}
Expand description
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
YCbCr(u8)
Pixel is YCbCr
Trait Implementations§
source§impl PartialEq for ColorType
impl PartialEq for ColorType
impl Copy for ColorType
impl Eq for ColorType
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 UnwindSafe for ColorType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more