large-image-source-deepzoom
raw JSON → 1.34.1 verified Sat May 09 auth: no python
A tilesource for large-image that reads deepzoom pyramid images. Currently at version 1.34.1, released as part of the large-image ecosystem. Released irregularly alongside the main large-image package.
pip install large-image-source-deepzoom Common errors
error ModuleNotFoundError: No module named 'large_image_source_deepzoom' ↓
cause Attempting to import with hyphen instead of underscore, or package not installed.
fix
Install with 'pip install large-image-source-deepzoom' and import as 'large_image_source_deepzoom'.
error large_image_source_deepzoom.open: error while reading the file: OSError: cannot identify image file ↓
cause File is not a valid deepzoom image (not DZI or incompatible format).
fix
Verify that the file is a valid .dzi or .json deepzoom file. Use PIL or openslide to test if the file is corrupt.
error AttributeError: 'DeepZoomFileTileSource' object has no attribute 'getRegion' ↓
cause Attempting to call getRegion on a tile source that uses getTile instead.
fix
Use 'getTile(tile_x, tile_y, z)' or check the large-image API for the correct method. Refer to large-image documentation.
Warnings
gotcha The module name is 'large_image_source_deepzoom' (underscores), not 'large-image-source-deepzoom' (hyphens). Import errors occur when using hyphens. ↓
fix Use 'from large_image_source_deepzoom import DeepZoomFileTileSource'.
gotcha DeepZoomFileTileSource expects a file path, not a URL or bytes. Using invalid input causes cryptic errors. ↓
fix Ensure you provide a local file path string to the constructor.
deprecated The 'large_image_source_deepzoom' package is rarely updated independently; it follows large-image releases. Older versions may lack recent fixes. ↓
fix Keep up to date with the large-image package: pip install large-image large-image-source-deepzoom --upgrade
Imports
- DeepZoomFileTileSource
from large_image_source_deepzoom import DeepZoomFileTileSource
Quickstart
from large_image_source_deepzoom import DeepZoomFileTileSource
import os
# Replace with your deepzoom file path
file_path = os.environ.get('DEEPZOOM_FILE', 'path/to/image.dzi')
ts = DeepZoomFileTileSource(file_path)
print(f'Tile source metadata: {ts.getMetadata()}')