Enum rawloader::Orientation
source · [−]pub enum Orientation {
Normal,
HorizontalFlip,
Rotate180,
VerticalFlip,
Transpose,
Rotate90,
Transverse,
Rotate270,
Unknown,
}
Expand description
Possible orientations of an image
Values are taken from the IFD tag Orientation (0x0112) in most cases but they can be obtained from other metadata in the file.
Variants
Normal
HorizontalFlip
Rotate180
VerticalFlip
Transpose
Rotate90
Transverse
Rotate270
Unknown
Implementations
sourceimpl Orientation
impl Orientation
sourcepub fn from_u16(orientation: u16) -> Orientation
pub fn from_u16(orientation: u16) -> Orientation
Convert a u16 from the IFD tag Orientation (0x0112) into its corresponding enum value
sourcepub fn to_flips(&self) -> (bool, bool, bool)
pub fn to_flips(&self) -> (bool, bool, bool)
Convert orientation to an image flip operation tuple. The first field is if x and y coordinates should be swapped (transposed). The second and third field is horizontal and vertical flipping respectively. For a correct result, flipping must be done before transposing.
Trait Implementations
sourceimpl Clone for Orientation
impl Clone for Orientation
sourcefn clone(&self) -> Orientation
fn clone(&self) -> Orientation
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Orientation
impl Debug for Orientation
sourceimpl Hash for Orientation
impl Hash for Orientation
sourceimpl PartialEq<Orientation> for Orientation
impl PartialEq<Orientation> for Orientation
impl Copy for Orientation
impl Eq for Orientation
impl StructuralEq for Orientation
impl StructuralPartialEq for Orientation
Auto Trait Implementations
impl RefUnwindSafe for Orientation
impl Send for Orientation
impl Sync for Orientation
impl Unpin for Orientation
impl UnwindSafe for Orientation
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more