Enum jpeg_decoder::decoder::PixelFormat
source · pub enum PixelFormat {
L8,
L16,
RGB24,
CMYK32,
}
Expand description
An enumeration over combinations of color spaces and bit depths a pixel can have.
Variants§
L8
Luminance (grayscale), 8 bits
L16
Luminance (grayscale), 16 bits
RGB24
RGB, 8 bits per channel
CMYK32
CMYK, 8 bits per channel
Implementations§
source§impl PixelFormat
impl PixelFormat
sourcepub fn pixel_bytes(&self) -> usize
pub fn pixel_bytes(&self) -> usize
Determine the size in bytes of each pixel in this format
Trait Implementations§
source§impl Clone for PixelFormat
impl Clone for PixelFormat
source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PixelFormat
impl Debug for PixelFormat
source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
source§fn eq(&self, other: &PixelFormat) -> bool
fn eq(&self, other: &PixelFormat) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for PixelFormat
impl StructuralPartialEq for PixelFormat
Auto Trait Implementations§
impl Freeze for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnwindSafe for PixelFormat
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