#[repr(u32)]pub enum PixelFormat {
Mono8 = 17_301_505,
Mono16 = 17_825_799,
BayerRG8 = 17_301_513,
BayerGB8 = 17_301_514,
BayerBG8 = 17_301_515,
BayerGR8 = 17_301_512,
RGB8Packed = 35_127_316,
BGR8Packed = 35_127_317,
Unknown(u32),
}Expand description
Enumeration of the pixel formats supported by the helper routines.
Variants§
Mono8 = 17_301_505
Mono16 = 17_825_799
BayerRG8 = 17_301_513
BayerGB8 = 17_301_514
BayerBG8 = 17_301_515
BayerGR8 = 17_301_512
RGB8Packed = 35_127_316
BGR8Packed = 35_127_317
Unknown(u32)
Unknown PFNC code reported by the device.
Implementations§
Source§impl PixelFormat
impl PixelFormat
Sourcepub const fn from_code(code: u32) -> PixelFormat
pub const fn from_code(code: u32) -> PixelFormat
Convert a raw PFNC code into a PixelFormat enumeration.
Sourcepub const fn bytes_per_pixel(self) -> Option<usize>
pub const fn bytes_per_pixel(self) -> Option<usize>
Number of bytes used to encode a single pixel for well-known formats.
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
Source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
Returns a duplicate 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 Display for PixelFormat
impl Display for PixelFormat
Source§impl Hash for PixelFormat
impl Hash for PixelFormat
Source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
impl Copy for PixelFormat
impl Eq 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