Skip to main content

TiffInfo

Struct TiffInfo 

Source
#[non_exhaustive]
pub struct TiffInfo {
Show 21 fields pub width: u32, pub height: u32, pub channels: u16, pub bit_depth: u8, pub color_type: ColorType, pub is_float: bool, pub is_signed: bool, pub icc_profile: Option<Vec<u8>>, pub exif: Option<Vec<u8>>, pub xmp: Option<Vec<u8>>, pub iptc: Option<Vec<u8>>, pub resolution_unit: Option<u16>, pub x_resolution: Option<(u32, u32)>, pub y_resolution: Option<(u32, u32)>, pub dpi: Option<(f64, f64)>, pub orientation: Option<u16>, pub compression: Option<u16>, pub photometric: Option<u16>, pub samples_per_pixel: Option<u16>, pub page_count: Option<u32>, pub page_name: Option<String>,
}
Expand description

TIFF image metadata from decoding.

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.
§width: u32

Image width in pixels.

§height: u32

Image height in pixels.

§channels: u16

Number of channels per pixel in the source.

§bit_depth: u8

Bits per channel in the source.

§color_type: ColorType

Source color type from the TIFF decoder.

§is_float: bool

Whether the source uses floating-point samples.

§is_signed: bool

Whether the source uses signed integer samples.

§icc_profile: Option<Vec<u8>>

ICC color profile (Tag 34675).

§exif: Option<Vec<u8>>

Raw EXIF sub-IFD bytes, re-serialized from the EXIF IFD (Tag 34665 pointer).

§xmp: Option<Vec<u8>>

XMP metadata (Tag 700).

§iptc: Option<Vec<u8>>

IPTC-NAA metadata (Tag 33723).

§resolution_unit: Option<u16>

Resolution unit (Tag 296): 1 = no unit, 2 = inch, 3 = centimeter.

§x_resolution: Option<(u32, u32)>

X resolution as a rational (numerator, denominator) (Tag 282).

§y_resolution: Option<(u32, u32)>

Y resolution as a rational (numerator, denominator) (Tag 283).

§dpi: Option<(f64, f64)>

DPI computed from resolution tags. Both values are in dots-per-inch (centimeter resolution is converted). None if resolution unit is absent or “no unit” (1).

§orientation: Option<u16>

EXIF orientation (Tag 274): values 1-8. None if not present.

§compression: Option<u16>

Compression method (Tag 259).

§photometric: Option<u16>

Photometric interpretation (Tag 262).

§samples_per_pixel: Option<u16>

Samples per pixel (Tag 277).

§page_count: Option<u32>

Number of IFDs (pages/frames) in the file.

§page_name: Option<String>

Page name (Tag 285). None if not present.

Trait Implementations§

Source§

impl Clone for TiffInfo

Source§

fn clone(&self) -> TiffInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TiffInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.