#[non_exhaustive]pub enum PixelFormat {
U8,
I8,
U16,
I16,
U32,
I32,
U64,
I64,
F16,
F32,
F64,
Other,
}Expand description
The scalar type of one channel value.
This describes what a file stores or what a writer should produce. It is
deliberately wider than the Pixel trait: OpenImageIO can
report formats such as PixelFormat::U32 that the contiguous buffer API
does not read or write.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
U8
Unsigned 8-bit, the usual format for PNG, JPEG and TGA.
I8
Signed 8-bit.
U16
Unsigned 16-bit, common in TIFF and PNG.
I16
Signed 16-bit.
U32
Unsigned 32-bit.
I32
Signed 32-bit.
U64
Unsigned 64-bit.
I64
Signed 64-bit.
F16
IEEE 754 binary16, matching half::f16, and what most EXRs hold.
F32
IEEE 754 binary32.
F64
IEEE 754 binary64.
Other
A format this crate does not model, including OpenImageIO’s UNKNOWN.
Implementations§
Source§impl PixelFormat
impl PixelFormat
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
impl Copy for PixelFormat
Source§impl Debug for PixelFormat
impl Debug for PixelFormat
Source§impl Display for PixelFormat
impl Display for PixelFormat
impl Eq for PixelFormat
Source§impl FromStr for PixelFormat
impl FromStr 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 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§
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