BlobByteSource class

Reads a TIFF/BigTIFF file from a browser Blob — typically the File from an <input type="file"> or a drop event. The browser reads each requested range from disk on demand, so the file's size doesn't matter.

final document = await TiffDecoder.decodeAsync(BlobByteSource(file));
final rgba = await document.images.first.decodeRegionRgba8Async(region);
Inheritance

Constructors

BlobByteSource(Blob blob)
Reads the TIFF file held in blob.

Properties

blob → Blob
The blob being read.
final
hashCode → int
The hash code for this object.
no setterinherited
length → int
Total size of the file in bytes.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
Releases any underlying resources. Called by TiffDocument.close.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(int offset, int length) → Future<Uint8List>
Reads exactly length bytes starting at offset. Never called with a range outside 0..this.length, and may be called several times concurrently.
override
toString() → String
A string representation of this object.
inherited

Operators

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