#[repr(u8)]pub enum PixelFormat {
Show 53 variants
ARGB32 = 0,
BGRA32 = 1,
ABGR32 = 2,
RGBA32 = 3,
RGB24 = 4,
BGR24 = 5,
I420 = 6,
I422 = 7,
I444 = 8,
I440 = 9,
NV12 = 10,
NV21 = 11,
NV16 = 12,
NV61 = 13,
NV24 = 14,
NV42 = 15,
YV12 = 16,
YV16 = 17,
YV24 = 18,
YUYV = 19,
YVYU = 20,
UYVY = 21,
VYUY = 22,
AYUV = 23,
Y8 = 24,
YA8 = 25,
RGB30 = 26,
BGR30 = 27,
ARGB64 = 28,
BGRA64 = 29,
ABGR64 = 30,
RGBA64 = 31,
I010 = 32,
I210 = 33,
I410 = 34,
I44010 = 35,
P010 = 36,
P210 = 37,
P410 = 38,
I012 = 39,
I212 = 40,
I412 = 41,
I44012 = 42,
P012 = 43,
P212 = 44,
P412 = 45,
I016 = 46,
I216 = 47,
I416 = 48,
I44016 = 49,
P016 = 50,
P216 = 51,
P416 = 52,
}Variants§
ARGB32 = 0
BGRA32 = 1
ABGR32 = 2
RGBA32 = 3
RGB24 = 4
BGR24 = 5
I420 = 6
I422 = 7
I444 = 8
I440 = 9
NV12 = 10
NV21 = 11
NV16 = 12
NV61 = 13
NV24 = 14
NV42 = 15
YV12 = 16
YV16 = 17
YV24 = 18
YUYV = 19
YVYU = 20
UYVY = 21
VYUY = 22
AYUV = 23
Y8 = 24
YA8 = 25
RGB30 = 26
BGR30 = 27
ARGB64 = 28
BGRA64 = 29
ABGR64 = 30
RGBA64 = 31
I010 = 32
I210 = 33
I410 = 34
I44010 = 35
P010 = 36
P210 = 37
P410 = 38
I012 = 39
I212 = 40
I412 = 41
I44012 = 42
P012 = 43
P212 = 44
P412 = 45
I016 = 46
I216 = 47
I416 = 48
I44016 = 49
P016 = 50
P216 = 51
P416 = 52
Implementations§
Source§impl PixelFormat
impl PixelFormat
pub fn components(&self) -> u8
pub fn component_bytes(&self, component: u8) -> u8
pub fn chroma_subsampling(&self) -> Option<ChromaSubsampling>
pub fn depth(&self) -> u8
pub fn is_rgb(&self) -> bool
pub fn is_yuv(&self) -> bool
pub fn is_planar(&self) -> bool
pub fn is_packed(&self) -> bool
pub fn is_biplanar(&self) -> bool
pub fn calc_plane_row_bytes(&self, plane_index: usize, width: u32) -> u32
pub fn calc_plane_height(&self, plane_index: usize, height: u32) -> u32
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
Source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PixelFormat
impl Debug for PixelFormat
Source§impl Default for PixelFormat
impl Default for PixelFormat
Source§fn default() -> PixelFormat
fn default() -> PixelFormat
Returns the “default value” for a type. Read more
Source§impl From<PixelFormat> for usize
impl From<PixelFormat> for usize
Source§fn from(value: PixelFormat) -> Self
fn from(value: PixelFormat) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
Source§impl TryFrom<u8> for PixelFormat
impl TryFrom<u8> for PixelFormat
Source§type Error = TryFromPrimitiveError<PixelFormat>
type Error = TryFromPrimitiveError<PixelFormat>
The type returned in the event of a conversion error.
Source§impl TryFrom<usize> for PixelFormat
impl TryFrom<usize> for PixelFormat
Source§impl TryFromPrimitive for PixelFormat
impl TryFromPrimitive for PixelFormat
const NAME: &'static str = "PixelFormat"
type Primitive = u8
type Error = TryFromPrimitiveError<PixelFormat>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for PixelFormat
impl Eq for PixelFormat
impl StructuralPartialEq for PixelFormat
Auto Trait Implementations§
impl Freeze for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnwindSafe for PixelFormat
Blanket Implementations§
§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
Mutably borrows from an owned value. Read more
§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)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more