pub enum BitmapFormat {
Gray8,
Rgb24,
Rgba32,
Bgra32,
}Expand description
Pixel format for bitmap data.
Variants§
Gray8
8-bit grayscale.
Rgb24
24-bit RGB (3 bytes per pixel).
Rgba32
32-bit RGBA (4 bytes per pixel, premultiplied alpha).
Bgra32
32-bit BGRA (4 bytes per pixel, premultiplied alpha).
Implementations§
Source§impl BitmapFormat
impl BitmapFormat
Sourcepub fn bytes_per_pixel(self) -> u32
pub fn bytes_per_pixel(self) -> u32
Number of bytes per pixel.
Sourcepub fn components(self) -> u32
pub fn components(self) -> u32
Number of color components.
Trait Implementations§
Source§impl Clone for BitmapFormat
impl Clone for BitmapFormat
Source§fn clone(&self) -> BitmapFormat
fn clone(&self) -> BitmapFormat
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 BitmapFormat
impl Debug for BitmapFormat
Source§impl Hash for BitmapFormat
impl Hash for BitmapFormat
Source§impl PartialEq for BitmapFormat
impl PartialEq for BitmapFormat
impl Copy for BitmapFormat
impl Eq for BitmapFormat
impl StructuralPartialEq for BitmapFormat
Auto Trait Implementations§
impl Freeze for BitmapFormat
impl RefUnwindSafe for BitmapFormat
impl Send for BitmapFormat
impl Sync for BitmapFormat
impl Unpin for BitmapFormat
impl UnsafeUnpin for BitmapFormat
impl UnwindSafe for BitmapFormat
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