large-image-source-pil
raw JSON → 1.34.1 verified Sat May 09 auth: no python
A Pillow tilesource for large_image, enabling reading of common image formats (PNG, JPEG, TIFF, etc.) using Pillow. Version 1.34.1 is current, with a maintenance cadence of monthly releases.
pip install large-image-source-pil Common errors
error ImportError: cannot import name 'PILFileTileSource' from 'large_image.tilesource' ↓
cause Incorrect import path; the tilesource is in a separate package.
fix
Install large-image-source-pil and use 'from large_image_source_pil import PILFileTileSource'.
error ModuleNotFoundError: No module named 'large_image_source_pil' ↓
cause The package large-image-source-pil is not installed.
fix
pip install large-image-source-pil
Warnings
breaking Python 3.10+ only. Python 3.9 and older are not supported (requires_python >=3.10). ↓
fix Use Python >=3.10
deprecated The 'method' parameter in getRegion() may be removed. The histogram signature changed in 1.34.1. ↓
fix Check the current API docs; use the new signature.
gotcha PILFileTileSource may not support all image formats that Pillow itself supports (e.g., multi-page TIFF, animated GIF). ↓
fix Use large_image_source_tiff for TIFF, or large_image for more comprehensive support.
Imports
- PILFileTileSource wrong
from large_image.tilesource import PILFileTileSourcecorrectfrom large_image_source_pil import PILFileTileSource
Quickstart
from large_image_source_pil import PILFileTileSource
source = PILFileTileSource('path/to/image.png')
tile = source.getTile(0, 0, 0) # get top-left tile at level 0
print(tile.shape)