[][src]Struct imaged::sys::ImageMeta

#[repr(C)]pub struct ImageMeta {
    pub width: u64,
    pub height: u64,
    pub color: ImageColor,
    pub kind: ImageKind,
    pub bits: u8,
}

ImageMeta is used to store image metadata with information about the image shape and type

Fields

width: u64height: u64color: ImageColorkind: ImageKindbits: u8

Implementations

impl Meta[src]

pub fn new(w: usize, h: usize, color: Color, ty: Type) -> Meta[src]

Create a new Meta instance

pub fn width(&self) -> usize[src]

pub fn height(&self) -> usize[src]

pub fn with_color(&self, color: Color) -> Self[src]

Create a new Meta instance from an existing one with the color changed

pub fn with_type(&self, t: Type) -> Self[src]

Create a new Meta instance from an existing one with the type changed

pub fn get_type(&self) -> Type[src]

Get the underlying data type

pub fn get_color(&self) -> Color[src]

Get image colorspace

pub fn total_bytes(&self) -> usize[src]

Get total number of bytes occupied by the image data

pub fn channels(&self) -> usize[src]

Get the number of channels

Trait Implementations

impl Clone for ImageMeta[src]

impl Copy for ImageMeta[src]

impl Debug for ImageMeta[src]

impl PartialEq<ImageMeta> for ImageMeta[src]

impl PartialOrd<ImageMeta> for ImageMeta[src]

impl StructuralPartialEq for ImageMeta[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.