pub struct RgbFormat;Expand description
A Zero-Size-Type that contains the definition to convert a given image stream to an RGB888 in the Buffer’s .decode_image()
use image::{ImageBuffer, Rgb};
let image: ImageBuffer<Rgb<u8>, Vec<u8>> = buffer.to_image::<RgbFormat>();Trait Implementations§
Source§impl FormatDecoder for RgbFormat
impl FormatDecoder for RgbFormat
const FORMATS: &'static [FrameFormat]
type Output = Rgb<u8>
Source§fn write_output(
fcc: FrameFormat,
resolution: Resolution,
data: &[u8],
) -> Result<Vec<u8>, NokhwaError>
fn write_output( fcc: FrameFormat, resolution: Resolution, data: &[u8], ) -> Result<Vec<u8>, NokhwaError>
Allocates and returns a
Vec Read moreSource§fn write_output_buffer(
fcc: FrameFormat,
resolution: Resolution,
data: &[u8],
dest: &mut [u8],
) -> Result<(), NokhwaError>
fn write_output_buffer( fcc: FrameFormat, resolution: Resolution, data: &[u8], dest: &mut [u8], ) -> Result<(), NokhwaError>
Writes to a user provided buffer. Read more
Source§impl Ord for RgbFormat
impl Ord for RgbFormat
Source§impl PartialOrd for RgbFormat
impl PartialOrd for RgbFormat
impl Copy for RgbFormat
impl Eq for RgbFormat
impl StructuralPartialEq for RgbFormat
Auto Trait Implementations§
impl Freeze for RgbFormat
impl RefUnwindSafe for RgbFormat
impl Send for RgbFormat
impl Sync for RgbFormat
impl Unpin for RgbFormat
impl UnsafeUnpin for RgbFormat
impl UnwindSafe for RgbFormat
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