pub struct ImageFileDirectory { /* private fields */ }
Expand description
An ImageFileDirectory representing Image content
Implementations§
Source§impl ImageFileDirectory
impl ImageFileDirectory
Sourcepub fn new_subfile_type(&self) -> Option<u32>
pub fn new_subfile_type(&self) -> Option<u32>
A general indication of the kind of data contained in this subfile. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/newsubfiletype.html
Sourcepub fn image_width(&self) -> u32
pub fn image_width(&self) -> u32
The number of columns in the image, i.e., the number of pixels per row. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/imagewidth.html
Sourcepub fn image_height(&self) -> u32
pub fn image_height(&self) -> u32
The number of rows of pixels in the image. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/imagelength.html
Sourcepub fn bits_per_sample(&self) -> &[u16]
pub fn bits_per_sample(&self) -> &[u16]
Number of bits per component. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/bitspersample.html
Sourcepub fn compression(&self) -> CompressionMethod
pub fn compression(&self) -> CompressionMethod
Compression scheme used on the image data. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/compression.html
Sourcepub fn photometric_interpretation(&self) -> PhotometricInterpretation
pub fn photometric_interpretation(&self) -> PhotometricInterpretation
The color space of the image data. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html
Sourcepub fn document_name(&self) -> Option<&str>
pub fn document_name(&self) -> Option<&str>
Document name.
Sourcepub fn image_description(&self) -> Option<&str>
pub fn image_description(&self) -> Option<&str>
A string that describes the subject of the image. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/imagedescription.html
Sourcepub fn strip_offsets(&self) -> Option<&[u64]>
pub fn strip_offsets(&self) -> Option<&[u64]>
For each strip, the byte offset of that strip. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/stripoffsets.html
Sourcepub fn orientation(&self) -> Option<u16>
pub fn orientation(&self) -> Option<u16>
The orientation of the image with respect to the rows and columns. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/orientation.html
Sourcepub fn samples_per_pixel(&self) -> u16
pub fn samples_per_pixel(&self) -> u16
The number of components per pixel.
SamplesPerPixel is usually 1 for bilevel, grayscale, and palette-color images. SamplesPerPixel is usually 3 for RGB images. If this value is higher, ExtraSamples should give an indication of the meaning of the additional channels.
Sourcepub fn rows_per_strip(&self) -> Option<u32>
pub fn rows_per_strip(&self) -> Option<u32>
The number of rows per strip. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/rowsperstrip.html
Sourcepub fn strip_byte_counts(&self) -> Option<&[u64]>
pub fn strip_byte_counts(&self) -> Option<&[u64]>
For each strip, the number of bytes in the strip after compression. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/stripbytecounts.html
Sourcepub fn min_sample_value(&self) -> Option<&[u16]>
pub fn min_sample_value(&self) -> Option<&[u16]>
The minimum component value used. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/minsamplevalue.html
Sourcepub fn max_sample_value(&self) -> Option<&[u16]>
pub fn max_sample_value(&self) -> Option<&[u16]>
The maximum component value used. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/maxsamplevalue.html
Sourcepub fn x_resolution(&self) -> Option<f64>
pub fn x_resolution(&self) -> Option<f64>
The number of pixels per ResolutionUnit in the ImageWidth direction. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/xresolution.html
Sourcepub fn y_resolution(&self) -> Option<f64>
pub fn y_resolution(&self) -> Option<f64>
The number of pixels per ResolutionUnit in the ImageLength direction. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/yresolution.html
Sourcepub fn planar_configuration(&self) -> PlanarConfiguration
pub fn planar_configuration(&self) -> PlanarConfiguration
How the components of each pixel are stored.
The specification defines these values:
- Chunky format. The component values for each pixel are stored contiguously. For example, for RGB data, the data is stored as RGBRGBRGB
- Planar format. The components are stored in separate component planes. For example, RGB data is stored with the Red components in one component plane, the Green in another, and the Blue in another.
The specification adds a warning that PlanarConfiguration=2 is not in widespread use and that Baseline TIFF readers are not required to support it.
If SamplesPerPixel is 1, PlanarConfiguration is irrelevant, and need not be included.
Sourcepub fn resolution_unit(&self) -> Option<ResolutionUnit>
pub fn resolution_unit(&self) -> Option<ResolutionUnit>
The unit of measurement for XResolution and YResolution. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/resolutionunit.html
Sourcepub fn software(&self) -> Option<&str>
pub fn software(&self) -> Option<&str>
Name and version number of the software package(s) used to create the image. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/software.html
Sourcepub fn date_time(&self) -> Option<&str>
pub fn date_time(&self) -> Option<&str>
Date and time of image creation.
The format is: “YYYY:MM:DD HH:MM:SS”, with hours like those on a 24-hour clock, and one space character between the date and the time. The length of the string, including the terminating NUL, is 20 bytes.
Sourcepub fn artist(&self) -> Option<&str>
pub fn artist(&self) -> Option<&str>
Person who created the image. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/artist.html
Sourcepub fn host_computer(&self) -> Option<&str>
pub fn host_computer(&self) -> Option<&str>
The computer and/or operating system in use at the time of image creation. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/hostcomputer.html
Sourcepub fn predictor(&self) -> Option<Predictor>
pub fn predictor(&self) -> Option<Predictor>
A mathematical operator that is applied to the image data before an encoding scheme is applied. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/predictor.html
Sourcepub fn tile_width(&self) -> Option<u32>
pub fn tile_width(&self) -> Option<u32>
The tile width in pixels. This is the number of columns in each tile. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/tilewidth.html
Sourcepub fn tile_height(&self) -> Option<u32>
pub fn tile_height(&self) -> Option<u32>
The tile length (height) in pixels. This is the number of rows in each tile. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/tilelength.html
Sourcepub fn tile_offsets(&self) -> Option<&[u64]>
pub fn tile_offsets(&self) -> Option<&[u64]>
For each tile, the byte offset of that tile, as compressed and stored on disk. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/tileoffsets.html
Sourcepub fn tile_byte_counts(&self) -> Option<&[u64]>
pub fn tile_byte_counts(&self) -> Option<&[u64]>
For each tile, the number of (compressed) bytes in that tile. https://web.archive.org/web/20240329145339/https://www.awaresystems.be/imaging/tiff/tifftags/tilebytecounts.html
Sourcepub fn extra_samples(&self) -> Option<&[u16]>
pub fn extra_samples(&self) -> Option<&[u16]>
Description of extra components. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/extrasamples.html
Sourcepub fn sample_format(&self) -> &[SampleFormat]
pub fn sample_format(&self) -> &[SampleFormat]
Specifies how to interpret each data sample in a pixel. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/sampleformat.html
Sourcepub fn jpeg_tables(&self) -> Option<&[u8]>
pub fn jpeg_tables(&self) -> Option<&[u8]>
JPEG quantization and/or Huffman tables. https://web.archive.org/web/20240329145250/https://www.awaresystems.be/imaging/tiff/tifftags/jpegtables.html
Sourcepub fn geo_key_directory(&self) -> Option<&GeoKeyDirectory>
pub fn geo_key_directory(&self) -> Option<&GeoKeyDirectory>
Sourcepub fn model_pixel_scale(&self) -> Option<&[f64]>
pub fn model_pixel_scale(&self) -> Option<&[f64]>
Used in interchangeable GeoTIFF files. https://web.archive.org/web/20240329145238/https://www.awaresystems.be/imaging/tiff/tifftags/modelpixelscaletag.html
Sourcepub fn model_tiepoint(&self) -> Option<&[f64]>
pub fn model_tiepoint(&self) -> Option<&[f64]>
Used in interchangeable GeoTIFF files. https://web.archive.org/web/20240329145303/https://www.awaresystems.be/imaging/tiff/tifftags/modeltiepointtag.html
Sourcepub async fn fetch_tile(
&self,
x: usize,
y: usize,
reader: &dyn AsyncFileReader,
) -> AsyncTiffResult<Tile>
pub async fn fetch_tile( &self, x: usize, y: usize, reader: &dyn AsyncFileReader, ) -> AsyncTiffResult<Tile>
Fetch the tile located at x
column and y
row using the provided reader.
Sourcepub async fn fetch_tiles(
&self,
x: &[usize],
y: &[usize],
reader: &dyn AsyncFileReader,
) -> AsyncTiffResult<Vec<Tile>>
pub async fn fetch_tiles( &self, x: &[usize], y: &[usize], reader: &dyn AsyncFileReader, ) -> AsyncTiffResult<Vec<Tile>>
Fetch the tiles located at x
column and y
row using the provided reader.
Sourcepub fn tile_count(&self) -> Option<(usize, usize)>
pub fn tile_count(&self) -> Option<(usize, usize)>
Return the number of x/y tiles in the IFD
Returns None
if this is not a tiled TIFF
Trait Implementations§
Source§impl Clone for ImageFileDirectory
impl Clone for ImageFileDirectory
Source§fn clone(&self) -> ImageFileDirectory
fn clone(&self) -> ImageFileDirectory
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl !Freeze for ImageFileDirectory
impl RefUnwindSafe for ImageFileDirectory
impl Send for ImageFileDirectory
impl Sync for ImageFileDirectory
impl Unpin for ImageFileDirectory
impl UnwindSafe for ImageFileDirectory
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