#[non_exhaustive]pub enum PixelFormat {
Uyvy422,
Rgb565,
Rgb888,
Argb8888,
Gray8,
}unstable only.Expand description
Pixel formats supported by the PPA SRM operation.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Uyvy422
Packed UYVY 4:2:2, using limited-range BT.601 color conversion.
Input widths must be even. Output widths, horizontal offsets, and transformed region widths must be even.
Rgb565
RGB565 in native byte order.
Conversion to 8-bit channels fills the least significant bits with zeros.
Rgb888
RGB888, stored as B, G, R bytes.
Argb8888
ARGB8888 in native byte order, stored as B, G, R, A bytes.
Input alpha is preserved. Inputs without alpha are treated as opaque.
Gray8
One byte per pixel, using (85 * R + 86 * G + 85 * B) >> 8 for RGB input.
Implementations§
Source§impl PixelFormat
impl PixelFormat
Sourcepub fn bytes_per_pixel(self) -> usize
pub fn bytes_per_pixel(self) -> usize
Returns the number of bytes per pixel.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
impl Copy for PixelFormat
Source§impl Debug for PixelFormat
impl Debug for PixelFormat
impl Eq for PixelFormat
Source§impl Hash for PixelFormat
impl Hash for PixelFormat
Source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
impl StructuralPartialEq for PixelFormat
Auto Trait Implementations§
impl Forget for PixelFormat
impl Freeze for PixelFormat
impl Move for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnsafeUnpin for PixelFormat
impl UnwindSafe for PixelFormat
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)