magick-tile
This package and command-line utility 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 https://github.com/zimeon/iiif/blob/master/iiif_static.py, but uses ImageMagick rather than Pillow in order to speed up generation at the expense of a less flexible treatment of images.
Prerequisites
- Python > 3.9
- Imagemagick must be available on your path
Installation
pip install magick-tile
Run
Usage: magick_tile [OPTIONS] SOURCE OUTPUT IDENTIFIER
Efficiently create derivative tiles of a very large image, and structure them into
directories compliant with IIIF Level 0.
╭─ Arguments ──────────────────────────────────────────────────────────────────────╮
│ * source FILE [required] │
│ * output DIRECTORY Destination directory for tiles [required] │
│ * identifier TEXT Image identifier to be written to final │
│ info.json (e.g. │
│ https://example.com/iiif/my_image) │
│ [required] │
╰──────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────╮
│ --tile-size INTEGER Tile size to produce │
│ [default: 512] │
│ --format [jpg|tif|png|gif|jp2|pdf File formats to generate │
│ |webp] (must be supported by │
│ Imagemagick's 'convert') │
│ [default: jpg] │
│ --install-completion Install completion for the │
│ current shell. │
│ --show-completion Show completion for the │
│ current shell, to copy it │
│ or customize the │
│ installation. │
│ --help Show this message and │
│ exit. │
╰──────────────────────────────────────────────────────────────────────────────────╯
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.
Metadata
Release files for magick-tile 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| magick_tile-0.1.1.tar.gz | 7.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| magick_tile-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.3 kB
Release files / magick_tile-0.1.1.tar.gz
| Download URL | magick_tile-0.1.1.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f332470e88a13b424dd11ee205a0c4836ad2c28620ecfe5c79ae604d1c438ff
|
|
BLAKE2b-256 checksum How to use checksums |
57d15574ab97c33c1e24731e9be8c8e175e67b9c5849c7efb1c5d2763c707cf8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.10.8 Darwin/22.1.0
|
Release files / magick_tile-0.1.1-py3-none-any.whl
| Download URL | magick_tile-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02997443aaef875fb6c43a3597c80dd7361038b3933305ee1254e05d25a18a51
|
|
BLAKE2b-256 checksum How to use checksums |
c4c224d50b1c4ac0d3bc6290fed83627807e8c9a74c2b041e60f77ab81542cf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.10.8 Darwin/22.1.0
|
Security for magick-tile 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.