Struct immeta::Dimensions
[−]
[src]
pub struct Dimensions { pub width: u32, pub height: u32, }
Represents image dimensions in pixels.
As it turns out, this is essentially the only common piece of information across various image formats.
It is possible to convert pairs of type (T1, T2)
, where T1
and T2
are primitive
number types, to this type, however, this is mostly needed for internal usage.
Fields
width: u32
Image width in pixels.
height: u32
Image height in pixels.
Trait Implementations
impl Copy for Dimensions
[src]
impl Clone for Dimensions
[src]
fn clone(&self) -> Dimensions
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Dimensions
[src]
fn eq(&self, __arg_0: &Dimensions) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Dimensions) -> bool
This method tests for !=
.
impl Eq for Dimensions
[src]
impl Debug for Dimensions
[src]
impl<T: ToPrimitive, U: ToPrimitive> From<(T, U)> for Dimensions
[src]
fn from((w, h): (T, U)) -> Dimensions
Performs the conversion.