large-image-source-vips

raw JSON →
1.34.1 verified Sat May 09 auth: no python

A libvips tile source for the large-image framework, enabling efficient reading and tiling of large images using the libvips library. Current version 1.34.1, with a cadence of several minor releases per year.

pip install large-image-source-vips
error ModuleNotFoundError: No module named 'large_image_source_vips'
cause The package is not installed.
fix
Run 'pip install large-image-source-vips'.
error ValueError: No tile source found for file
cause The Vips tile source is not registered; you may have forgotten to import the module or libvips is missing.
fix
Add 'from large_image_source_vips import VipsTileSource' before using getTileSource, and ensure libvips is installed.
gotcha The source module must be imported or installed for large_image to discover it; use 'from large_image_source_vips import VipsTileSource' or ensure it's in an installed package.
fix Run 'pip install large-image-source-vips' and import the source class explicitly.
gotcha libvips must be installed system-wide (e.g., via apt, brew, or conda) separately from the Python bindings.
fix Install libvips using your system package manager (e.g., 'apt install libvips' on Ubuntu, 'brew install vips' on macOS).
deprecated Support for Python <3.10 was dropped in v1.34.0.
fix Use Python 3.10 or later.

Opens an image using the Vips tile source and prints metadata and a tile shape.

from large_image_source_vips import VipsTileSource
from large_image import getTileSource
# Open an image file
ts = getTileSource('path/to/image.tif')
print(ts.getMetadata())
# Get a tile (256x256 pixels at zoom level 0)
tile = ts.getTile(0, 0, 0)
print(tile.shape)