pub enum Orientation {
Normal,
FlipH,
Rotate180,
FlipV,
Transpose,
Rotate90,
Transverse,
Rotate270,
}Variants§
Normal
1 — 0°, no transform (the stored pixels are already upright).
FlipH
2 — mirrored horizontally.
Rotate180
3 — rotated 180°.
FlipV
4 — mirrored vertically.
Transpose
5 — mirrored horizontally then rotated 90° clockwise (transpose).
Rotate90
6 — rotated 90° clockwise.
Transverse
7 — mirrored horizontally then rotated 90° anti-clockwise (transverse).
Rotate270
8 — rotated 90° anti-clockwise.
Implementations§
Source§impl Orientation
impl Orientation
Sourcepub fn from_exif(v: u16) -> Self
pub fn from_exif(v: u16) -> Self
Map a raw EXIF Orientation value (1..=8) to an Orientation; anything out of
range (including 0) is treated as Normal.
Sourcepub fn is_identity(self) -> bool
pub fn is_identity(self) -> bool
Whether this orientation needs any container transform property at all.
Sourcepub fn imir_axis(self) -> Option<bool>
pub fn imir_axis(self) -> Option<bool>
The imir mirror axis, if mirroring is part of this orientation.
Some(true) = mirror across the horizontal axis (vertical flip);
Some(false) = mirror across the vertical axis (horizontal flip);
None = no mirror. (HEIF imir: low bit, 1 = horizontal axis.)
Sourcepub fn irot_steps(self) -> u8
pub fn irot_steps(self) -> u8
The irot rotation in 90° anti-clockwise steps (0..=3), applied after mirroring.
HEIF defines irot as anti-clockwise; we decompose each EXIF orientation into
an optional mirror followed by an anti-clockwise rotation.
Trait Implementations§
Source§impl Clone for Orientation
impl Clone for Orientation
Source§fn clone(&self) -> Orientation
fn clone(&self) -> Orientation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more