Registry / data / large-image-source-tiff

large-image-source-tiff

JSON →
library1.34.1pypypi✓ verified 84d ago

A TIFF tile source plugin for the large-image library, enabling efficient reading of tiled TIFF images (including BigTIFF, GeoTIFF, and multi-resolution pyramids). Current version: 1.34.1. Released as part of the large-image ecosystem; follows the main library's release cadence (approximately monthly).

pip install large-image-source-tiff
INSTALL
IMPORT
SIG · LARGE-IMAGE-SOURCE
L
large-image-source-tiff
datapythonv1.34.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TiffFileTileSource
from large_image_source_tiff import TiffFileTileSource
from large_image.tilesource import TiffFileTileSource
Incorrect import path as 'large_image.tilesource' does not contain the TIFF source directly; must import from the source plugin package.

Basic usage: create a TiffFileTileSource and retrieve a tile.

from large_image_source_tiff import TiffFileTileSource # Open a TIFF file source = TiffFileTileSource('path/to/image.tiff') # Get basic metadata print(source.getMetadata()) # Get a tile (x, y, z, format, encoding) tile = source.getTile(0, 0, 0) print('Tile data size:', len(tile))
Debug
Known issues
gotchaThe source only supports regular TIFF files (uncompressed, tiled). It does not handle JPEG-compressed TIFFs unless the 'pylibtiff' extra is installed and configured. Check your TIFF compression before use.
fix
Install with: pip install large-image-source-tiff[jpeg] or ensure your TIFF is tiled and uncompressed.
affects: all
gotchaThird-party readers (openslide, pylibtiff) can alter behavior. If you have multiple readers installed, the source may pick one not intended. Force a specific reader by setting environment variable LARGE_IMAGE_TIFF_READER (e.g., 'tifffile', 'pylibtiff', 'openslide').
fix
Set before import: os.environ['LARGE_IMAGE_TIFF_READER'] = 'tifffile'
affects: >=1.0.0
deprecatedThe 'girder' extra mark indicates future removal. The package is marked for girder < 5.0. If using Girder, prepare to migrate away from this integration.
fix
Use the library with large-image directly; avoid relying on Girder-specific features.
affects: 1.34.x
gotchaReading a small region from a large tile can be wrong (fixed in v1.34.1). If using older versions, getTile() with sourceRegion may return incorrect data.
fix
Upgrade to v1.34.1 or later; or use getRegion() with larger region requests.
affects: <1.34.1
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'large_image_source_tiff'
The package is not installed or is installed under a different distribution name.
fix
pip install large-image-source-tiff
Failed to read TIFF header: Not a TIFF or unknown format
File is corrupted or not a valid TIFF, or the reader does not support compression.
fix
Verify file integrity, ensure TIFF is tiled, and install jpeg support: pip install large-image-source-tiff[jpeg]
ImportError: cannot import name 'TiffFileTileSource' from 'large_image_source_tiff'
The class might be named differently or imported from the wrong path.
fix
Correct import: from large_image_source_tiff import TiffFileTileSource
ValueError: tile size mismatch: expected (256, 256) but got (512, 512)
The TIFF has non-standard tile dimensions or the source is reading at the wrong level.
fix
Use source.getMetadata() to check tile size and level dimensions; specify correct level in getTile(x, y, level).
Upgrade
Version history
1.34.1latest on PyPI · released Mar 24, 2026
Audit
Dependencies
large-imagerequiredCore library providing the tile source abstraction and caching infrastructure.
pylibtiffoptionalUsed for reading TIFF files; known to cause compatibility issues with certain TIFF tags.
openslide-pythonoptionalAlternative TIFF reader for whole-slide images; may be used if available.
Agent activity
6 hits · last 30 days
node
6
Resources