Struct imgproc_rs::image::ImageInfo [−][src]
A struct containing image information
Fields
width: u32
height: u32
channels: u8
alpha: 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
impl RefUnwindSafe for ImageInfo
impl Send for ImageInfo
impl Sync for ImageInfo
impl Unpin for ImageInfo
impl UnwindSafe for ImageInfo
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,