Skip to main content

Write iiif-image tiles using ImageMagick

Project description


PyPi version

This python script relies on Imagemagick to efficiently create derivative tiles of a very large image, and structure them into directories compliant with IIIF Level 0 specification for static sites.

This takes inspiration heavily from, but uses ImageMagick rather than Pillow in order to speed up generation at the expense of a less flexible treatment of images.



python3 --help

> Usage: [options] file (-h for help)
> IIIF Image API Level-0 static file generator
> Options:
>   -h, --help            show this help message and exit
>   -o OUTPUT, --output=OUTPUT
>                         Destination directory for tiles
>   -i IDENTIFIER, --identifier=IDENTIFIER
>                         Image identifier to be written to final info.json
>                         (e.g.
>   -t TILESIZE, --tilesize=TILESIZE
>                         Tile size to produce [default 256]

python3 -o apple/ -i "" apple.jpg

This will create and populate the specified output directory with tiles from a given image.

N.b. because several of the Imagemagick utilities called here already utilize multiple cores, returns for running this script in parallel diminish rapidly.

Matthew Lincoln

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

magick_tile-0.0.3.tar.gz (4.4 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page