TiffImage class
One page (IFD) of a TIFF/BigTIFF file: its metadata, plus the ability to decode its pixel data on demand.
Constructors
-
TiffImage.fromTags(Map<
int, TiffTagValue> tags, TiffByteReader reader, {required bool isBigTiff}) -
Builds a page from one IFD's resolved
tags, reading its pixel data throughreaderwhen a decode asks for it.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- metadata → TiffImageMetadata
-
This page's decoded tags: its size, layout, color and any
GeoTIFF/EXIF/GPS metadata.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
decode(
) → TiffRasterBuffer - Decodes this page's pixel data into raw, unpacked samples (no color interpretation applied — see decodeRgba8 for that).
-
decodeAsync(
) → Future< TiffRasterBuffer> -
decode, for a page from
TiffDecoder.decodeAsync: loads every strip/tile of the page first. Works on any page — for one from a synchronous source it's just decode. -
decodeRegion(
TiffRegion region) → TiffRasterBuffer -
Decodes only
regionof this page's pixel data. -
decodeRegionAsync(
TiffRegion region) → Future< TiffRasterBuffer> -
decodeRegion, for a page from
TiffDecoder.decodeAsync: loads only the strips/tiles overlappingregion(nearby ones in one read, the rest in parallel), then decodes them. Works on any page — for one from a synchronous source it's just decodeRegion. -
decodeRegionRgba8(
TiffRegion region) → Uint8List - decodeRegion followed by the same RGBA8 conversion decodeRgba8 applies — the way to get a low-memory RGBA preview of a crop from a multi-gigabyte page without ever materializing the whole image.
-
decodeRegionRgba8Async(
TiffRegion region) → Future< Uint8List> -
decodeRegionRgba8, for a page from
TiffDecoder.decodeAsync— see decodeRegionAsync. The way to view a crop of a file far larger than memory, e.g. one picked in a browser or served over HTTP. -
decodeRgba8(
) → Uint8List - Decodes and converts to interleaved 8-bit RGBA, applying the page's PhotometricInterpretation (grayscale, RGB, palette, CMYK, or non-subsampled YCbCr).
-
decodeRgba8Async(
) → Future< Uint8List> -
decodeRgba8, for a page from
TiffDecoder.decodeAsync— see decodeAsync. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readTileJpeg(
int tileX, int tileY) → Uint8List? -
Tile (
tileX,tileY) of a tiled, new-style JPEG (Compression 7), chunky page as one standalone JPEG stream — shared JPEGTables merged in, and forPhotometricInterpretation=RGBan Adobe APP14 marker declaring the samples untransformed — or null for a sparse tile (byte count 0). -
readTileJpegAsync(
int tileX, int tileY) → Future< Uint8List?> -
readTileJpeg, for a page from
TiffDecoder.decodeAsync: loads just that tile. Works on any page. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited