Skip to content

TIFF

async_tiff.TIFF

ifds property

Access the underlying IFDs of this TIFF.

Each ImageFileDirectory (IFD) represents one of the internal "sub images" of this file.

fetch_tile async

fetch_tile(x: int, y: int, z: int) -> Tile

Fetch a single tile.

Parameters:

  • x (int) –

    The column index within the ifd to read from.

  • y (int) –

    The row index within the ifd to read from.

  • z (int) –

    The IFD index to read from.

Returns:

  • Tile

    Tile response.

fetch_tiles async

fetch_tiles(x: list[int], y: list[int], z: int) -> list[Tile]

Fetch multiple tiles concurrently.

Parameters:

  • x (list[int]) –

    The column indexes within the ifd to read from.

  • y (list[int]) –

    The row indexes within the ifd to read from.

  • z (int) –

    The IFD index to read from.

Returns:

open async classmethod

open(
    path: str, *, store: ObjectStore | ObspecInput, prefetch: int | None = 16384
) -> TIFF

Open a new TIFF.

Parameters:

  • path (str) –

    The path within the store to read from.

  • store (ObjectStore | ObspecInput) –

    The backend to use for data fetching.

  • prefetch (int | None, default: 16384 ) –

    The number of initial bytes to read up front. Defaults to 16384.

Returns:

  • TIFF

    A TIFF instance.

async_tiff.ObspecInput

Bases: GetRangeAsync, GetRangesAsync, Protocol

Supported obspec input to reader.