pub struct TIFF { /* private fields */ }Expand description
A TIFF file.
Implementations§
Source§impl TIFF
impl TIFF
Sourcepub fn new(ifds: Vec<ImageFileDirectory>, endianness: Endianness) -> Self
pub fn new(ifds: Vec<ImageFileDirectory>, endianness: Endianness) -> Self
Create a new TIFF from existing IFDs.
Sourcepub fn ifds(&self) -> &[ImageFileDirectory]
pub fn ifds(&self) -> &[ImageFileDirectory]
Access the underlying Image File Directories.
Sourcepub fn endianness(&self) -> Endianness
pub fn endianness(&self) -> Endianness
Get the endianness of the TIFF file.
Sourcepub fn header_byte_size(&self) -> u64
pub fn header_byte_size(&self) -> u64
Returns the minimum prefetch size that covers all metadata.
Computed as the minimum non-zero offset across every IFD’s TileOffsets
and StripOffsets. For a typical Cloud-Optimized GeoTIFF, prefetching
this many bytes lets a future TIFF open complete metadata reading in
a single request.
§Panics
Panics if no IFD has either TileOffsets or StripOffsets. Per the TIFF
specification, every image IFD must have one of the two.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TIFF
impl RefUnwindSafe for TIFF
impl Send for TIFF
impl Sync for TIFF
impl Unpin for TIFF
impl UnsafeUnpin for TIFF
impl UnwindSafe for TIFF
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