#[non_exhaustive]pub enum ColorType {
Gray(u8),
RGB(u8),
Palette(u8),
GrayA(u8),
RGBA(u8),
CMYK(u8),
CMYKA(u8),
YCbCr(u8),
Multiband {
bit_depth: u8,
num_samples: u16,
},
}Expand description
An enumeration over supported color types and their bit depths
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future 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
Multiband
Pixel has multiple bands/channels
Trait Implementations§
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