pub struct Ifd {
pub index: usize,
/* private fields */
}Expand description
A parsed Image File Directory (IFD).
Fields§
§index: usizeIndex of this IFD in the chain (0-based).
Implementations§
Source§impl Ifd
impl Ifd
Returns all tags in this IFD.
Sourcepub fn bits_per_sample(&self) -> Vec<u16>
pub fn bits_per_sample(&self) -> Vec<u16>
Bits per sample for each channel.
Sourcepub fn compression(&self) -> u16
pub fn compression(&self) -> u16
Compression scheme (1 = none, 5 = LZW, 8 = Deflate, …).
Sourcepub fn photometric_interpretation(&self) -> Option<u16>
pub fn photometric_interpretation(&self) -> Option<u16>
Photometric interpretation.
Sourcepub fn photometric_interpretation_enum(
&self,
) -> Option<PhotometricInterpretation>
pub fn photometric_interpretation_enum( &self, ) -> Option<PhotometricInterpretation>
Typed photometric interpretation, defaulting to MinIsBlack when the
TIFF tag is omitted.
Sourcepub fn samples_per_pixel(&self) -> u16
pub fn samples_per_pixel(&self) -> u16
Number of samples (bands) per pixel.
Sourcepub fn tile_width(&self) -> Option<u32>
pub fn tile_width(&self) -> Option<u32>
Tile width (only for tiled IFDs).
Sourcepub fn tile_height(&self) -> Option<u32>
pub fn tile_height(&self) -> Option<u32>
Tile height (only for tiled IFDs).
Sourcepub fn rows_per_strip(&self) -> Option<u32>
pub fn rows_per_strip(&self) -> Option<u32>
Rows per strip. Defaults to the image height when not present.
Sourcepub fn sample_format(&self) -> Vec<u16>
pub fn sample_format(&self) -> Vec<u16>
Sample format for each channel.
Sourcepub fn planar_configuration(&self) -> u16
pub fn planar_configuration(&self) -> u16
Planar configuration. Defaults to chunky (1).
Sourcepub fn lerc_parameters(&self) -> Result<Option<LercParameters>>
pub fn lerc_parameters(&self) -> Result<Option<LercParameters>>
TIFF-side LERC parameters, when present.
Sourcepub fn extra_samples(&self) -> Result<Vec<ExtraSample>>
pub fn extra_samples(&self) -> Result<Vec<ExtraSample>>
TIFF ExtraSamples semantics.
Sourcepub fn ink_set(&self) -> Result<Option<InkSet>>
pub fn ink_set(&self) -> Result<Option<InkSet>>
TIFF InkSet semantics for separated photometric data.
Sourcepub fn ycbcr_subsampling(&self) -> Result<Option<[u16; 2]>>
pub fn ycbcr_subsampling(&self) -> Result<Option<[u16; 2]>>
TIFF YCbCr chroma subsampling factors.
Sourcepub fn ycbcr_positioning(&self) -> Result<Option<YCbCrPositioning>>
pub fn ycbcr_positioning(&self) -> Result<Option<YCbCrPositioning>>
TIFF YCbCr sample positioning.
Sourcepub fn reference_black_white(&self) -> Result<Option<[f64; 6]>>
pub fn reference_black_white(&self) -> Result<Option<[f64; 6]>>
TIFF ReferenceBlackWhite values normalized to f64.
Sourcepub fn color_model(&self) -> Result<ColorModel>
pub fn color_model(&self) -> Result<ColorModel>
Structured color-model metadata synthesized from TIFF photometric and ancillary color tags.
Sourcepub fn strip_offsets(&self) -> Option<Vec<u64>>
pub fn strip_offsets(&self) -> Option<Vec<u64>>
Strip offsets as normalized u64s.
Sourcepub fn strip_byte_counts(&self) -> Option<Vec<u64>>
pub fn strip_byte_counts(&self) -> Option<Vec<u64>>
Strip byte counts as normalized u64s.
Sourcepub fn tile_offsets(&self) -> Option<Vec<u64>>
pub fn tile_offsets(&self) -> Option<Vec<u64>>
Tile offsets as normalized u64s.
Sourcepub fn tile_byte_counts(&self) -> Option<Vec<u64>>
pub fn tile_byte_counts(&self) -> Option<Vec<u64>>
Tile byte counts as normalized u64s.
Sourcepub fn sub_ifd_offsets(&self) -> Option<Vec<u64>>
pub fn sub_ifd_offsets(&self) -> Option<Vec<u64>>
SubIFD offsets as normalized u64s.
Sourcepub fn raster_layout(&self) -> Result<RasterLayout>
pub fn raster_layout(&self) -> Result<RasterLayout>
Normalize and validate the raster layout for typed reads.
Sourcepub fn decoded_raster_layout(&self) -> Result<RasterLayout>
pub fn decoded_raster_layout(&self) -> Result<RasterLayout>
Normalize the raster layout produced by high-level pixel reads.
This layout reflects color-decoded output rather than the on-disk sample organization. For example, palette and YCbCr rasters decode to RGB pixels, and sub-byte integer rasters expand to 8-bit samples.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ifd
impl RefUnwindSafe for Ifd
impl Send for Ifd
impl Sync for Ifd
impl Unpin for Ifd
impl UnsafeUnpin for Ifd
impl UnwindSafe for Ifd
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> 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