pub struct LumaFormat;Expand description
A Zero-Size-Type that contains the definition to convert a given image stream to an Luma8(Grayscale 8-bit) in the Buffer’s .decode_image()
use image::{ImageBuffer, Luma};
let image: ImageBuffer<Luma<u8>, Vec<u8>> = buffer.to_image::<LumaFormat>();Trait Implementations§
Source§impl Clone for LumaFormat
impl Clone for LumaFormat
Source§fn clone(&self) -> LumaFormat
fn clone(&self) -> LumaFormat
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 LumaFormat
impl Debug for LumaFormat
Source§impl Default for LumaFormat
impl Default for LumaFormat
Source§fn default() -> LumaFormat
fn default() -> LumaFormat
Returns the “default value” for a type. Read more
Source§impl FormatDecoder for LumaFormat
impl FormatDecoder for LumaFormat
const FORMATS: &'static [FrameFormat]
type Output = Luma<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 Hash for LumaFormat
impl Hash for LumaFormat
Source§impl Ord for LumaFormat
impl Ord for LumaFormat
Source§fn cmp(&self, other: &LumaFormat) -> Ordering
fn cmp(&self, other: &LumaFormat) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LumaFormat
impl PartialEq for LumaFormat
Source§impl PartialOrd for LumaFormat
impl PartialOrd for LumaFormat
impl Copy for LumaFormat
impl Eq for LumaFormat
impl StructuralPartialEq for LumaFormat
Auto Trait Implementations§
impl Freeze for LumaFormat
impl RefUnwindSafe for LumaFormat
impl Send for LumaFormat
impl Sync for LumaFormat
impl Unpin for LumaFormat
impl UnsafeUnpin for LumaFormat
impl UnwindSafe for LumaFormat
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