pub struct PixelFormat(/* private fields */);Expand description
Four character code (fourcc) defining the encoding of pixel data in an image buffer.
fourcc codes are documented on https://www.fourcc.org/.
Implementations§
Source§impl PixelFormat
impl PixelFormat
Sourcepub const fn from_fourcc(fourcc: [u8; 4]) -> Self
pub const fn from_fourcc(fourcc: [u8; 4]) -> Self
Creates a PixelFormat from a fourcc code.
Source§impl PixelFormat
Pixel format constants.
impl PixelFormat
Pixel format constants.
Sourcepub const XBGR32: Self
pub const XBGR32: Self
XR24: bbbbbbbb gggggggg rrrrrrrr xxxxxxxx
The xxxxxxxx channel data is ignored.
Sourcepub const RGBX32: Self
pub const RGBX32: Self
XB24: rrrrrrrr gggggggg bbbbbbbb xxxxxxxx
The xxxxxxxx channel data is ignored.
Sourcepub const XRGB32: Self
pub const XRGB32: Self
BX24: xxxxxxxx rrrrrrrr gggggggg bbbbbbbb
The xxxxxxxx channel data is ignored.
Sourcepub const BGR32: Self
pub const BGR32: Self
BGR4: bbbbbbbb gggggggg rrrrrrrr ???????? DEPRECATED
This format is deprecated because the meaning of the last channel is ill-defined and its
interpretation depends on driver and application. It will either be ignored (xxxxxxxx /
Self::XBGR32) or treated as an alpha channel (aaaaaaaa / Self::ABGR32), so one of
those formats should be used instead if possible.
Sourcepub const RGB32: Self
pub const RGB32: Self
RGB4: ???????? rrrrrrrr gggggggg bbbbbbbb DEPRECATED
This format is deprecated because the meaning of the first channel is ill-defined and its
interpretation depends on driver and application. It will either be ignored (xxxxxxxx /
Self::XRGB32) or treated as an alpha channel (aaaaaaaa / Self::ARGB32), so one of
those formats should be used instead if possible.
Sourcepub const YUYV: Self
pub const YUYV: Self
YUYV: yyyyyyyy uuuuuuuu YYYYYYYY vvvvvvvv
Packed YUV/YCbCr data with 4:2:2 chroma subsampling.
uuuuuuuu and vvvvvvvv are shared by 2 neighboring pixels, while yyyyyyyy is the left
pixel’s Y value, and YYYYYYYY is the right pixel’s Y value.
Sourcepub const MJPG: Self
pub const MJPG: Self
MJPG: Motion JPEG, a sequence of JPEG images with omitted huffman tables.
The transmitted JPEG images lack the “DHT” frame (Define Huffman Table), and instead use a predefined one. Most common JPEG decoders will handle this fine and don’t need any extra preprocessing.
Sourcepub const JPEG: Self
pub const JPEG: Self
JPEG: Data is a sequence of regular JFIF JPEG still images.
Images can be decoded with any off-the-shelf JPEG decoder, no preprocessing is needed.
Sourcepub const UVC: Self
pub const UVC: Self
UVCH: UVC payload header metadata.
Data is a stream of UvcMetadata structures.
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
Source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more