Struct imgproc_rs::image::ImageInfo[][src]

pub struct ImageInfo {
    pub width: u32,
    pub height: u32,
    pub channels: u8,
    pub alpha: bool,
}

A struct containing image information

Fields

width: u32height: u32channels: u8alpha: bool

Implementations

impl ImageInfo[src]

pub fn new(width: u32, height: u32, channels: u8, alpha: bool) -> Self[src]

Creates a new ImageInfo

pub fn wh(&self) -> (u32, u32)[src]

Returns the width and height of the image

pub fn whc(&self) -> (u32, u32, u8)[src]

Returns the width, height, and channels of the image

pub fn whca(&self) -> (u32, u32, u8, bool)[src]

Returns the width, height, channels, and alpha of the image

pub fn channels_non_alpha(&self) -> u8[src]

Returns the number of non alpha channels in the image

pub fn size(&self) -> u32[src]

Returns the size of the image (width * height)

pub fn full_size(&self) -> u32[src]

Returns the full size of the image (width * height * channels)

Trait Implementations

impl Clone for ImageInfo[src]

impl Copy for ImageInfo[src]

impl Debug for ImageInfo[src]

impl Display for ImageInfo[src]

impl PartialEq<ImageInfo> for ImageInfo[src]

impl StructuralPartialEq for ImageInfo[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> Pointable for T

type Init = T

The type for initializers.

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.