Skip to content

Tile

async_tiff.Tile

A representation of a TIFF image tile.

compressed_bytes property

compressed_bytes: Buffer

The compressed bytes underlying this tile.

compression_method property

compression_method: CompressionMethod | int

The compression method used by this tile.

x property

x: int

The column index this tile represents.

y property

y: int

The row index this tile represents.

decode async

decode(
    *,
    decoder_registry: DecoderRegistry | None = None,
    pool: ThreadPool | None = None,
) -> Array

Decode this tile's data.

This is an asynchronous function that will offload the tile decompression to a thread pool.

Other Parameters:

  • decoder_registry (DecoderRegistry | None) –

    the decoders to use for decompression. Defaults to None, in which case a default decoder registry is used.

  • pool (ThreadPool | None) –

    the thread pool on which to run decompression. Defaults to None, in which case, a default thread pool is used.

Returns:

  • Array

    Decoded tile data as an Array instance.

decode_sync

decode_sync(*, decoder_registry: DecoderRegistry | None = None) -> Array

Decode this tile's data.

Note: This is a blocking function and will perform the tile decompression on the current thread. Prefer using the asynchronous decode method, which will offload decompression to a thread pool.

Other Parameters:

  • decoder_registry (DecoderRegistry | None) –

    the decoders to use for decompression. Defaults to None, in which case a default decoder registry is used.

Returns:

  • Array

    Decoded tile data as an Array instance.