Skip to main content

TiffTag

Enum TiffTag 

Source
#[repr(u16)]
pub enum TiffTag {
Show 120 variants ImageWidth = 256, ImageLength = 257, BitsPerSample = 258, Compression = 259, PhotometricInterpretation = 262, ImageDescription = 270, Make = 271, Model = 272, StripOffsets = 273, Orientation = 274, SamplesPerPixel = 277, RowsPerStrip = 278, StripByteCounts = 279, XResolution = 282, YResolution = 283, PlanarConfiguration = 284, ResolutionUnit = 296, Software = 305, DateTime = 306, Predictor = 317, WhitePoint = 318, PrimaryChromaticities = 319, TileWidth = 322, TileLength = 323, TileOffsets = 324, TileByteCounts = 325, SubIFDs = 330, JPEGTables = 347, YCbCrCoefficients = 529, YCbCrSubSampling = 530, YCbCrPositioning = 531, ReferenceBlackWhite = 532, ExifIFDPointer = 34_665, GPSInfoIFDPointer = 34_853, ExposureTime = 33_434, FNumber = 33_437, ExposureProgram = 34_850, ISOSpeedRatings = 34_855, ExifVersion = 36_864, DateTimeOriginal = 36_867, DateTimeDigitized = 36_868, OffsetTime = 36_880, OffsetTimeOriginal = 36_881, OffsetTimeDigitized = 36_882, ShutterSpeedValue = 37_377, ApertureValue = 37_378, BrightnessValue = 37_379, ExposureBiasValue = 37_380, MaxApertureValue = 37_381, MeteringMode = 37_383, Flash = 37_385, FocalLength = 37_386, SubSecTime = 37_520, SubSecTimeOriginal = 37_521, SubSecTimeDigitized = 37_522, MakerNote = 37_500, FocalLengthIn35mmFilm = 41_989, LensMake = 42_035, LensModel = 42_036, PrintImageMatching = 50_357, GPSLatitudeRef = 1, GPSLatitude = 2, GPSLongitudeRef = 3, GPSLongitude = 4, GPSAltitudeRef = 5, GPSAltitude = 6, GPSTimeStamp = 7, GPSSpeed = 13, GPSImgDirection = 17, GPSDateStamp = 29, CFARepeatPatternDim = 33_421, CFAPattern = 33_422, DNGVersion = 50_706, DNGBackwardVersion = 50_707, UniqueCameraModel = 50_708, LocalizedCameraModel = 50_709, CFAPlaneColor = 50_710, CFALayout = 50_711, LinearizationTable = 50_712, BlackLevelRepeatDim = 50_713, BlackLevel = 50_714, BlackLevelDeltaH = 50_715, BlackLevelDeltaV = 50_716, WhiteLevel = 50_717, DefaultScale = 50_718, DefaultCropOrigin = 50_719, DefaultCropSize = 50_720, ColorMatrix1 = 50_721, ColorMatrix2 = 50_722, CameraCalibration1 = 50_723, CameraCalibration2 = 50_724, AnalogBalance = 50_727, AsShotNeutral = 50_728, AsShotWhiteXY = 50_729, BaselineExposure = 50_730, BaselineNoise = 50_731, BaselineSharpness = 50_732, ActiveArea = 50_829, MaskedAreas = 50_830, OpcodeList1 = 51_008, OpcodeList2 = 51_009, OpcodeList3 = 51_022, CalibrationIlluminant1 = 50_778, CalibrationIlluminant2 = 50_779, NoiseProfile = 51_041, NoiseReductionApplied = 51_109, DefaultBlackRender = 51_110, ProfileName = 50_936, ProfileToneCurve = 50_940, ProfileGainTableMap = 52_544, SemanticName = 52_529, NewSubfileType = 254, SonyRawFileType = 29_184, SonyToneCurve = 28_688, SonyCropTopLeft = 29_895, SonyCropSize = 29_896, SR2SubIFDLength = 29_185, SR2SubIFDKey = 29_217, JPEGInterchangeFormat = 513, JPEGInterchangeFormatLength = 514,
}
Expand description

Known TIFF tag IDs.

This enum contains tags commonly found in TIFF-based RAW formats. Unknown tags are handled separately via the parser’s unknown tag storage.

Variants§

§

ImageWidth = 256

Image width in pixels (0x0100)

§

ImageLength = 257

Image height/length in pixels (0x0101)

§

BitsPerSample = 258

Bits per sample/channel (0x0102)

§

Compression = 259

Compression scheme (0x0103)

§

PhotometricInterpretation = 262

Photometric interpretation (0x0106)

§

ImageDescription = 270

Image description (0x010E)

§

Make = 271

Camera/scanner manufacturer (0x010F)

§

Model = 272

Camera/scanner model (0x0110)

§

StripOffsets = 273

Byte offsets to image strips (0x0111)

§

Orientation = 274

Image orientation (0x0112)

§

SamplesPerPixel = 277

Samples per pixel (0x0115)

§

RowsPerStrip = 278

Rows per strip (0x0116)

§

StripByteCounts = 279

Byte counts for strips (0x0117)

§

XResolution = 282

X resolution (0x011A)

§

YResolution = 283

Y resolution (0x011B)

§

PlanarConfiguration = 284

Planar configuration (0x011C)

§

ResolutionUnit = 296

Resolution unit (0x0128)

§

Software = 305

Software used (0x0131)

§

DateTime = 306

Date/time of modification (0x0132)

§

Predictor = 317

Predictor for compression (0x013D)

§

WhitePoint = 318

White point chromaticity (0x013E)

§

PrimaryChromaticities = 319

Primary chromaticities (0x013F)

§

TileWidth = 322

Tile width (0x0142)

§

TileLength = 323

Tile length/height (0x0143)

§

TileOffsets = 324

Byte offsets to tiles (0x0144)

§

TileByteCounts = 325

Byte counts for tiles (0x0145)

§

SubIFDs = 330

Offsets to SubIFDs (0x014A) - critical for RAW formats

§

JPEGTables = 347

JPEG tables (0x015B)

§

YCbCrCoefficients = 529

YCbCr coefficients (0x0211)

§

YCbCrSubSampling = 530

YCbCr subsampling (0x0212)

§

YCbCrPositioning = 531

YCbCr positioning (0x0213)

§

ReferenceBlackWhite = 532

Reference black/white (0x0214)

§

ExifIFDPointer = 34_665

Pointer to EXIF IFD (0x8769)

§

GPSInfoIFDPointer = 34_853

Pointer to GPS IFD (0x8825)

§

ExposureTime = 33_434

Exposure time in seconds (0x829A)

§

FNumber = 33_437

F-number (0x829D)

§

ExposureProgram = 34_850

Exposure program (0x8822)

§

ISOSpeedRatings = 34_855

ISO speed ratings (0x8827)

§

ExifVersion = 36_864

EXIF version (0x9000)

§

DateTimeOriginal = 36_867

Date/time original (0x9003)

§

DateTimeDigitized = 36_868

Date/time digitized (0x9004)

§

OffsetTime = 36_880

Offset time (timezone for DateTime, 0x9010)

§

OffsetTimeOriginal = 36_881

Offset time original (timezone for DateTimeOriginal, 0x9011)

§

OffsetTimeDigitized = 36_882

Offset time digitized (timezone for DateTimeDigitized, 0x9012)

§

ShutterSpeedValue = 37_377

Shutter speed value APEX (0x9201)

§

ApertureValue = 37_378

Aperture value APEX (0x9202)

§

BrightnessValue = 37_379

Brightness value (0x9203)

§

ExposureBiasValue = 37_380

Exposure compensation (0x9204)

§

MaxApertureValue = 37_381

Maximum aperture value (0x9205)

§

MeteringMode = 37_383

Metering mode (0x9207)

§

Flash = 37_385

Flash (0x9209)

§

FocalLength = 37_386

Focal length (0x920A)

§

SubSecTime = 37_520

Sub-second time (0x9290)

§

SubSecTimeOriginal = 37_521

Sub-second time original (0x9291)

§

SubSecTimeDigitized = 37_522

Sub-second time digitized (0x9292)

§

MakerNote = 37_500

MakerNote (0x927C)

§

FocalLengthIn35mmFilm = 41_989

Focal length in 35mm film equivalent (0xA405)

§

LensMake = 42_035

Lens make (0xA433)

§

LensModel = 42_036

Lens model (0xA434)

§

PrintImageMatching = 50_357

Print Image Matching data (0xC4B5)

§

GPSLatitudeRef = 1

GPS latitude reference (‘N’ or ‘S’) (0x0001)

§

GPSLatitude = 2

GPS latitude (0x0002)

§

GPSLongitudeRef = 3

GPS longitude reference (‘E’ or ‘W’) (0x0003)

§

GPSLongitude = 4

GPS longitude (0x0004)

§

GPSAltitudeRef = 5

GPS altitude reference (0x0005)

§

GPSAltitude = 6

GPS altitude (0x0006)

§

GPSTimeStamp = 7

GPS timestamp (0x0007)

§

GPSSpeed = 13

GPS speed (0x000D)

§

GPSImgDirection = 17

GPS image direction (0x0011)

§

GPSDateStamp = 29

GPS datestamp (0x001D)

§

CFARepeatPatternDim = 33_421

CFA repeat pattern dimensions (0x828D)

§

CFAPattern = 33_422

CFA pattern (0x828E)

§

DNGVersion = 50_706

DNG version (0xC612)

§

DNGBackwardVersion = 50_707

DNG backward version (0xC613)

§

UniqueCameraModel = 50_708

Unique camera model (0xC614)

§

LocalizedCameraModel = 50_709

Localized camera model (0xC615)

§

CFAPlaneColor = 50_710

CFA plane color (0xC616)

§

CFALayout = 50_711

CFA layout (0xC617)

§

LinearizationTable = 50_712

Linearization table (0xC618)

§

BlackLevelRepeatDim = 50_713

Black level repeat dim (0xC619)

§

BlackLevel = 50_714

Black level (0xC61A)

§

BlackLevelDeltaH = 50_715

Black level delta H (0xC61B)

§

BlackLevelDeltaV = 50_716

Black level delta V (0xC61C)

§

WhiteLevel = 50_717

White level (0xC61D)

§

DefaultScale = 50_718

Default scale (0xC61E)

§

DefaultCropOrigin = 50_719

Default crop origin (0xC61F)

§

DefaultCropSize = 50_720

Default crop size (0xC620)

§

ColorMatrix1 = 50_721

Color matrix 1 (0xC621)

§

ColorMatrix2 = 50_722

Color matrix 2 (0xC622)

§

CameraCalibration1 = 50_723

Camera calibration 1 (0xC623)

§

CameraCalibration2 = 50_724

Camera calibration 2 (0xC624)

§

AnalogBalance = 50_727

Analog balance (0xC627)

§

AsShotNeutral = 50_728

As shot neutral (0xC628)

§

AsShotWhiteXY = 50_729

As shot white XY (0xC629)

§

BaselineExposure = 50_730

Baseline exposure (0xC62A)

§

BaselineNoise = 50_731

Baseline noise (0xC62B)

§

BaselineSharpness = 50_732

Baseline sharpness (0xC62C)

§

ActiveArea = 50_829

Active area (0xC68D)

§

MaskedAreas = 50_830

Masked areas (0xC68E)

§

OpcodeList1 = 51_008

Opcode list 1 (0xC740)

§

OpcodeList2 = 51_009

Opcode list 2 (0xC741)

§

OpcodeList3 = 51_022

Opcode list 3 (0xC74E)

§

CalibrationIlluminant1 = 50_778

Calibration illuminant 1 (0xC65A)

§

CalibrationIlluminant2 = 50_779

Calibration illuminant 2 (0xC65B)

§

NoiseProfile = 51_041

Noise profile (0xC761)

§

NoiseReductionApplied = 51_109

Noise reduction applied (0xC7A5)

§

DefaultBlackRender = 51_110

Default black render (0xC7A6)

§

ProfileName = 50_936

Profile name (0xC6F8)

§

ProfileToneCurve = 50_940

Profile tone curve (0xC6FC)

§

ProfileGainTableMap = 52_544

Profile gain table map (0xCD40)

§

SemanticName = 52_529

Semantic name (0xCD31)

§

NewSubfileType = 254

New subfile type (0x00FE)

§

SonyRawFileType = 29_184

Sony raw file type (0x7200)

§

SonyToneCurve = 28_688

Sony tone curve (0x7010)

§

SonyCropTopLeft = 29_895

Sony crop top/left (0x74C7)

§

SonyCropSize = 29_896

Sony crop size (0x74C8)

§

SR2SubIFDLength = 29_185

Sony SR2 SubIFD length

§

SR2SubIFDKey = 29_217

Sony SR2 SubIFD key

§

JPEGInterchangeFormat = 513

JPEG interchange format offset (0x0201)

§

JPEGInterchangeFormatLength = 514

JPEG interchange format length (0x0202)

Implementations§

Source§

impl TiffTag

Source

pub fn from_u16(value: u16) -> Option<Self>

Create a TiffTag from a raw u16 tag ID. Returns None if the tag is not known.

Source

pub fn as_u16(self) -> u16

Get the raw u16 value of this tag.

Source

pub fn name(&self) -> &'static str

Get a human-readable name for this tag.

Trait Implementations§

Source§

impl BinRead for TiffTag

Source§

type Args<'__binrw_generated_args_lifetime> = ()

The type used for the args parameter of read_args() and read_options(). Read more
Source§

fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>

Read Self from the reader using the given Endian and arguments. Read more
Source§

fn read_be<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments and assuming big-endian byte order. Read more
Source§

fn read_le<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read Self from the reader using default arguments and assuming little-endian byte order. Read more
Source§

fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
where R: Read + Seek, Self::Args<'a>: for<'a> Required,

Read T from the reader assuming native-endian byte order. Read more
Source§

fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming big-endian byte order, using the given arguments. Read more
Source§

fn read_le_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read Self from the reader, assuming little-endian byte order, using the given arguments. Read more
Source§

fn read_ne_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
where R: Read + Seek,

Read T from the reader, assuming native-endian byte order, using the given arguments. Read more
Source§

impl BinWrite for TiffTag

Source§

type Args<'__binrw_generated_args_lifetime> = ()

The type used for the args parameter of write_args() and write_options(). Read more
Source§

fn write_options<W: Write + Seek>( &self, __binrw_generated_var_writer: &mut W, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<()>

Write Self to the writer using the given Endian and arguments. Read more
Source§

fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write + Seek, Self::Args<'a>: for<'a> Required,

Write Self to the writer assuming big-endian byte order. Read more
Source§

fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write + Seek, Self::Args<'a>: for<'a> Required,

Write Self to the writer assuming little-endian byte order. Read more
Source§

fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Write + Seek, Self::Args<'a>: for<'a> Required,

Write Self to the writer assuming native-endian byte order. Read more
Source§

fn write_be_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
where W: Write + Seek,

Write Self to the writer, assuming big-endian byte order, using the given arguments. Read more
Source§

fn write_le_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
where W: Write + Seek,

Write Self to the writer, assuming little-endian byte order, using the given arguments. Read more
Source§

fn write_ne_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
where W: Write + Seek,

Write Self to the writer, assuming native-endian byte order, using the given arguments. Read more
Source§

impl Clone for TiffTag

Source§

fn clone(&self) -> TiffTag

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for TiffTag

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for TiffTag

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Hash for TiffTag

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for TiffTag

Source§

fn eq(&self, other: &TiffTag) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for TiffTag

Source§

impl Eq for TiffTag

Source§

impl StructuralPartialEq for TiffTag

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> CustomError for T
where T: Display + Debug + Send + Sync + 'static,

Source§

fn as_any(&self) -> &(dyn Any + Sync + Send + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + Sync + Send + 'static)

Source§

fn as_box_any(self: Box<T>) -> Box<dyn Any + Sync + Send>

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more