#[repr(C)]pub struct ImageMeta {
pub width: u64,
pub height: u64,
pub color: ImageColor,
pub kind: ImageKind,
pub bits: u8,
}
Expand description
ImageMeta is used to store image metadata with information about the image shape and type
Fields§
§width: u64
§height: u64
§color: ImageColor
§kind: ImageKind
§bits: u8
Implementations§
Source§impl Meta
impl Meta
pub fn width(&self) -> usize
pub fn height(&self) -> usize
Sourcepub fn with_color(&self, color: Color) -> Self
pub fn with_color(&self, color: Color) -> Self
Create a new Meta instance from an existing one with the color changed
Sourcepub fn with_type(&self, t: Type) -> Self
pub fn with_type(&self, t: Type) -> Self
Create a new Meta instance from an existing one with the type changed
Sourcepub fn total_bytes(&self) -> usize
pub fn total_bytes(&self) -> usize
Get total number of bytes occupied by the image data
Trait Implementations§
Source§impl PartialOrd for ImageMeta
impl PartialOrd for ImageMeta
impl Copy for ImageMeta
impl StructuralPartialEq for ImageMeta
Auto Trait Implementations§
impl Freeze for ImageMeta
impl RefUnwindSafe for ImageMeta
impl Send for ImageMeta
impl Sync for ImageMeta
impl Unpin for ImageMeta
impl UnwindSafe for ImageMeta
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