pub struct ImageInfo {
pub width: usize,
pub height: usize,
pub format: PixelFormat,
pub row_stride: usize,
pub rotation_degrees: u16,
pub flip_horizontal: bool,
}Expand description
Metadata returned after a successful image decode.
Fields§
§width: usizeWidth of the decoded image in pixels (the source’s true width; the codec does not apply EXIF rotation).
height: usizeHeight of the decoded image in pixels (the source’s true height).
format: PixelFormatNative pixel format written to the tensor (JPEG → Nv12/Grey,
PNG → Rgb/Rgba/Grey).
row_stride: usizeRow stride in bytes used when writing into the tensor.
rotation_degrees: u16EXIF orientation: clockwise rotation in degrees (0/90/180/270) the
consumer should apply downstream (e.g. via convert()). The codec does
not rotate. 0 when there is no EXIF orientation.
flip_horizontal: boolEXIF horizontal flip the consumer should apply downstream. false when
there is no EXIF orientation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImageInfo
impl RefUnwindSafe for ImageInfo
impl Send for ImageInfo
impl Sync for ImageInfo
impl Unpin for ImageInfo
impl UnsafeUnpin for ImageInfo
impl UnwindSafe for ImageInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more