tiff library

Read and write TIFF and BigTIFF image files.

Classes

ExifTagId
Common tag IDs found in the EXIF sub-IFD (pointed to by baseline tag 34665) — not exhaustive, just the fields most images actually carry. Anything else is still readable via TiffImageMetadata.exifTags' raw numeric keys.
GeoTiffKeyId
Common GeoTIFF GeoKey IDs (the GeoTIFF spec defines many more — this covers the ones most images actually set, enough to read a raster's coordinate reference system without needing a full GeoKey registry).
GeoTiffMetadata
GeoTIFF georeferencing metadata (the de facto standard for embedding a coordinate reference system in a TIFF, predating and unrelated to the TIFF 6.0 baseline spec). Not every raster has this — see TiffImageMetadata.geoTiff.
GeoTiffModelType
GTModelTypeGeoKey (1024) values.
GeoTiffTiepoint
One entry of the ModelTiepointTag (33922): a raster point mapped to a point in model (georeferenced) space.
GpsTagId
Common tag IDs in the GPS sub-IFD (pointed to by baseline tag 34853).
ImageAdjustments
Brightness/contrast/gamma adjustment for already-decoded 8-bit RGBA pixel data (e.g. the output of TiffImage.decodeRgba8).
ImageResampler
Downsampling for already-decoded 8-bit RGBA pixel data (e.g. the output of TiffImage.decodeRgba8) — the building block a pyramid of progressively smaller pages is built from (see TiffDisplayOptimizer).
MemoryByteSource
A TiffByteSource backed by an already-in-memory buffer.
TiffByteSource
Where a TiffByteReader gets its bytes from.
TiffChunkPlan
A plan for decoding a page's TiffImage.decodeRegionRgba8 in a series of horizontal chunks, computed to avoid two failure modes at once:
TiffDecoder
Entry point for decoding TIFF/BigTIFF files.
TiffDisplayOptimizer
Rewrites a page into a structure suited to smooth interactive display later — tiled (and optionally pyramided), rather than the strip layout and single resolution a source TIFF may only have.
TiffDocument
A fully-parsed TIFF/BigTIFF file: its byte order/format flavor plus every page found by following the IFD chain.
TiffEncoder
Entry point for writing TIFF/BigTIFF files.
TiffImage
One page (IFD) of a TIFF/BigTIFF file: its metadata, plus the ability to decode its pixel data on demand.
TiffImageMetadata
Decoded baseline metadata for a single TIFF page (one IFD), independent of how the pixel data is compressed. Pixel data is located either via strip tags or tile tags — exactly one of the two is populated, see isTiled.
TiffImageSpec
Everything needed to write one TIFF/BigTIFF page.
TiffInitialView
A region and display scale to show first for a page, sized for a viewer's viewport instead of the whole page.
TiffRasterBuffer
Decoded, unpacked pixel data for one TIFF page: one integer sample per channel per pixel, row-major, chunky/interleaved (channel varies fastest).
TiffRational
A RATIONAL/SRATIONAL value: an exact numerator/denominator pair.
TiffRegion
A rectangular sub-area of a page, in pixel coordinates, for decoding less than the full image — the point being to avoid materializing an entire multi-gigapixel BigTIFF page just to look at a small crop.
TiffTagId
Well-known baseline TIFF tag IDs (TIFF 6.0 §2-3).
TiffTagValue
A fully-resolved value read from a TIFF tag, typed according to its TiffTagType. Exactly one of ints/floats/rationals/text is set, matching type.

Enums

TiffByteOrder
Byte order marker found at the very start of a TIFF/BigTIFF file.
TiffOptimizationMode
How TiffDisplayOptimizer.optimize restructures a page.
TiffOptimizeStage
Which phase of TiffDisplayOptimizer.optimize (or TiffDisplayOptimizer.optimizeLargeSourcePyramidLevels) a TiffOptimizeProgress update was reported from.
TiffPhotometric
PhotometricInterpretation (tag 262): how sample values map to color.
TiffPlanarConfiguration
PlanarConfiguration (tag 284): how samples of a pixel are arranged.
TiffTagType
TIFF/BigTIFF tag value types (TIFF 6.0 §2, plus the BigTIFF extensions LONG8/SLONG8/IFD8 for 64-bit values and IFD pointers).

Typedefs

TiffOptimizeProgress = ({double fraction, int level, int levelCount, TiffOptimizeStage stage, int stepCount, int stepIndex})
Progress reported by TiffDisplayOptimizer.optimize (or TiffDisplayOptimizer.optimizeLargeSourcePyramidLevels) as it works.

Exceptions / Errors

TiffException
Thrown when a TIFF/BigTIFF file is malformed or uses a feature that is not supported by the current phase of the decoder/encoder.