pub struct IfdInfo<State = UncheckedIfdInfo> {
pub tile_width: u32,
pub tile_height: u32,
pub bands: usize,
pub planar: PlanarConfiguration,
pub image_width: u32,
pub image_height: u32,
/* private fields */
}Expand description
Owned IFD layout needed for stitching without borrowing TIFF metadata.
Self::validate checks tile and image dimensions. It does not validate
decoded array shapes, band counts or subsequent edits to these public fields.
Fields§
§tile_width: u32Width of one internal tile in pixels.
tile_height: u32Height of one internal tile in pixels.
bands: usizeNumber of native sample bands, including extra samples.
planar: PlanarConfigurationWhether decoded samples are band-planar or pixel-interleaved.
image_width: u32Width of the full image at this IFD’s resolution, in pixels.
image_height: u32Height of the full image at this IFD’s resolution, in pixels.
Implementations§
Source§impl IfdInfo<UncheckedIfdInfo>
impl IfdInfo<UncheckedIfdInfo>
Sourcepub fn from_parts(
tile_width: u32,
tile_height: u32,
bands: usize,
planar: PlanarConfiguration,
image_width: u32,
image_height: u32,
) -> Self
pub fn from_parts( tile_width: u32, tile_height: u32, bands: usize, planar: PlanarConfiguration, image_width: u32, image_height: u32, ) -> Self
Store the supplied tile dimensions, band layout and image dimensions
without validating or clamping them. Call Self::validate before stitching.
Sourcepub fn validate(self) -> AgResult<IfdInfo<ValidatedIfdInfo>>
pub fn validate(self) -> AgResult<IfdInfo<ValidatedIfdInfo>>
Check nonzero tile and image dimensions and return the checked marker. Band counts and decoded array shapes are not checked here.
§Errors
Returns AgError::Tiff if any tile or image dimension is zero.
Trait Implementations§
impl<State: Copy> Copy for IfdInfo<State>
Source§impl From<&ImageFileDirectory> for IfdInfo<UncheckedIfdInfo>
impl From<&ImageFileDirectory> for IfdInfo<UncheckedIfdInfo>
Source§fn from(ifd: &ImageFileDirectory) -> Self
fn from(ifd: &ImageFileDirectory) -> Self
Auto Trait Implementations§
impl<State> Freeze for IfdInfo<State>where
PhantomData<State>: Freeze,
impl<State> RefUnwindSafe for IfdInfo<State>where
PhantomData<State>: RefUnwindSafe,
impl<State> Send for IfdInfo<State>where
PhantomData<State>: Send,
impl<State> Sync for IfdInfo<State>where
PhantomData<State>: Sync,
impl<State> Unpin for IfdInfo<State>where
PhantomData<State>: Unpin,
impl<State> UnsafeUnpin for IfdInfo<State>where
PhantomData<State>: UnsafeUnpin,
impl<State> UnwindSafe for IfdInfo<State>where
PhantomData<State>: UnwindSafe,
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
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> ⓘ
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> ⓘ
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