#[non_exhaustive]pub struct PreviewInfo {
pub offset: u64,
pub length: u64,
pub width: u32,
pub height: u32,
pub encoding: PreviewEncoding,
pub orientation: Orientation,
pub kind: PreviewKind,
}Expand description
An embedded preview / thumbnail stored in the RAW container.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.offset: u64Byte offset of the preview data in the file.
length: u64Length of the preview data in bytes.
width: u32Width in pixels as stored (before orientation); 0 if unknown.
height: u32Height in pixels as stored (before orientation); 0 if unknown.
encoding: PreviewEncodingHow the preview bytes are encoded.
orientation: OrientationOrientation to apply to the preview’s stored pixels: usually the file orientation.
Where vendor orientation records are resolved (Canon CR2, Nikon, Kodak) it is
resolved per preview: a preview carrying its own EXIF orientation uses it, and a
preview that was rendered already rotated is Normal even when the RAW image is not.
kind: PreviewKindWhat the container labels this image as.
Implementations§
Source§impl PreviewInfo
impl PreviewInfo
Sourcepub fn new(
offset: u64,
length: u64,
width: u32,
height: u32,
encoding: PreviewEncoding,
orientation: Orientation,
kind: PreviewKind,
) -> Self
pub fn new( offset: u64, length: u64, width: u32, height: u32, encoding: PreviewEncoding, orientation: Orientation, kind: PreviewKind, ) -> Self
A preview of length bytes at offset in the file.
Trait Implementations§
Source§impl Clone for PreviewInfo
impl Clone for PreviewInfo
Source§impl Debug for PreviewInfo
impl Debug for PreviewInfo
Source§impl PartialEq for PreviewInfo
impl PartialEq for PreviewInfo
impl StructuralPartialEq for PreviewInfo
Auto Trait Implementations§
impl Freeze for PreviewInfo
impl RefUnwindSafe for PreviewInfo
impl Send for PreviewInfo
impl Sync for PreviewInfo
impl Unpin for PreviewInfo
impl UnsafeUnpin for PreviewInfo
impl UnwindSafe for PreviewInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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