Struct nokhwa::pixel_format::RgbFormat
source · 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
type Output = Rgb<u8>
const FORMATS: &'static [FrameFormat] = color_frame_formats()
source§fn write_output(
fcc: FrameFormat,
resolution: Resolution,
data: &[u8]
) -> Result<Vec<u8, Global>, NokhwaError>
fn write_output( fcc: FrameFormat, resolution: Resolution, data: &[u8] ) -> Result<Vec<u8, Global>, 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 PartialEq<RgbFormat> for RgbFormat
impl PartialEq<RgbFormat> for RgbFormat
source§impl PartialOrd<RgbFormat> for RgbFormat
impl PartialOrd<RgbFormat> for RgbFormat
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for RgbFormat
impl Eq for RgbFormat
impl StructuralEq for RgbFormat
impl StructuralPartialEq for RgbFormat
Auto Trait Implementations§
impl RefUnwindSafe for RgbFormat
impl Send for RgbFormat
impl Sync for RgbFormat
impl Unpin 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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.