TiffImageMetadata class

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.

Constructors

TiffImageMetadata({required int width, required int height, required List<int> bitsPerSample, required int samplesPerPixel, required int compression, required int predictor, required TiffPhotometric? photometric, required TiffPlanarConfiguration planarConfiguration, required int rowsPerStrip, required List<int> stripOffsets, required List<int> stripByteCounts, required int? tileWidth, required int? tileLength, required List<int>? tileOffsets, required List<int>? tileByteCounts, required List<int>? colorMap, required GeoTiffMetadata? geoTiff, required Map<int, TiffTagValue>? exifTags, required Map<int, TiffTagValue>? gpsTags, required Map<int, TiffTagValue> rawTags})
Creates metadata from already-decoded tag values. Prefer TiffImageMetadata.fromTags, which derives these from an IFD.
const
TiffImageMetadata.fromTags(Map<int, TiffTagValue> tags, {TiffByteReader? reader, bool isBigTiff = false})
Builds metadata from one IFD's resolved tags.
factory

Properties

bitsPerSample → List<int>
Bit depth of each sample (BitsPerSample, tag 258), one entry per sample; defaults to all-1 (bilevel) when the tag is absent.
final
colorMap → List<int>?
The palette (ColorMap, tag 320) for TiffPhotometric.palette pages: all red entries, then all green, then all blue, each 16-bit. Null when the page has no palette.
final
compression → int
Compression scheme (tag 259) the chunks are stored with; 1 (none) when absent.
final
exifTags → Map<int, TiffTagValue>?
Resolved tags from the EXIF sub-IFD (tag 34665), if present — see ExifTagId for common tag IDs.
final
geoTiff → GeoTiffMetadata?
GeoTIFF georeferencing metadata, if this page has any — see GeoTiffMetadata.
final
gpsTags → Map<int, TiffTagValue>?
Resolved tags from the GPS sub-IFD (tag 34853), if present — see GpsTagId for common tag IDs.
final
hashCode → int
The hash code for this object.
no setterinherited
height → int
The page's height in pixels (ImageLength, tag 257).
final
isTiled → bool
Whether pixel data is stored as tiles rather than strips — that is, whether tileOffsets or stripOffsets locates it.
no setter
jpegTables → Uint8List?
JPEGTables (tag 347) — shared quantization/Huffman tables prepended to each strip/tile's "abbreviated" JPEG stream, when compression is 6 or 7 and the encoder chose to share tables across strips.
no setter
photometric → TiffPhotometric?
How sample values map to color (tag 262), or null if the page doesn't say or uses a value this package doesn't model.
final
planarConfiguration → TiffPlanarConfiguration
Whether samples are interleaved per pixel or stored plane by plane (tag 284); TiffPlanarConfiguration.chunky when absent.
final
predictor → int
Differencing predictor (tag 317) applied before compression; 1 (none) when absent.
final
rawTags → Map<int, TiffTagValue>
Every tag found in this page's IFD, resolved but unfiltered — use this for tags not modeled above (ImageDescription, ...).
final
rowsPerStrip → int
Image rows per strip (tag 278); height (a single strip) when absent. Meaningless for tiled pages, where it is set to height.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
samplesPerPixel → int
Components per pixel (SamplesPerPixel, tag 277); 1 when absent.
final
stripByteCounts → List<int>
Compressed size of each strip in bytes (tag 279); empty when isTiled.
final
stripOffsets → List<int>
Byte offset of each strip (tag 273); empty when isTiled.
final
t4Options → int
T4Options (tag 292) — only meaningful when compression is 3.
no setter
t6Options → int
T6Options (tag 293) — only meaningful when compression is 4.
no setter
tileByteCounts → List<int>?
Compressed size of each tile in bytes (tag 325), or null when the page is striped.
final
tileLength → int?
Tile height in pixels (tag 323), or null when the page is striped.
final
tileOffsets → List<int>?
Byte offset of each tile (tag 324), or null when the page is striped.
final
tileWidth → int?
Tile width in pixels (tag 322), or null when the page is striped.
final
width → int
The page's width in pixels (ImageWidth, tag 256).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited