Creating static tiled images
There are a couple of command line libraries that will create static images. They are often listed with dynamic iiif servers or api libraries in the [Awesome IIIF readme] (https://github.com/IIIF/awesome-iiif?tab=readme-ov-file).
- iiif_s3 - Ruby library for generating a static IIIF level 0 Image and Presentation API server on Amazon S3.
- iiif - Python library providing a reference implementation of the Image API. Also includes a test server and static tile generator.
- iiif-tiler - Java library for generating static IIIF tiles (compliant with the V2.1 and 3.0 of the IIIF Image API).
- iiif-static-choices (not in readme).
Automating the process
The script above allows pdf, png, jpg, jp2, and tif files to be dumped into a folder, the script to be run and all files in the folder will be created into level 0 IIIF images. It uses the iiif library (#2) to create these tiled images.
It also preserves the file structure of the files you have dumped. For example, if you have two folders (cat-photos and dog-photos) in images, the output directory will keep that folder structure.
Install and running steps
- Create fork of https://github.com/dnoneill/dhsi-iiif-2024
- Clone your fork locally:
git clone https://github.com/[yourusername]/dhsi-iiif-2024
- Change directory into your fork
git clone dhsi-iiif-2024
- Make sure python with pip is installed
- Create virtual environment.
python3 -m venv [nameofenv]
- Activate virtual environment.
source [nameofenv]/bin/activate
- Install dependencies
pip3 install -r requirements.txt
- Dump files you want to convert into the
images
folder. - Move to the script directory
cd day1
- Run the script
python3 images_to_iiif.py
- View your images in the
iiif
folder
If the above doesn't work
- Create fork of https://github.com/dnoneill/dhsi-iiif-2024
- Clone your fork locally:
git clone https://github.com/[yourusername]/dhsi-iiif-2024
- add your images to the
images
folder. - add your images to the repository
git add images
- create a commit message
git commit -m "add images"
- push to your repository
git push origin main
- Wait for the script to run, you can view the progress here: https://github.com/[yourusername]/dhsi-iiif-2024/actions
- When it's green you should have files in the iiif folder.
Thoughts?
- Look at the files we have created. What can you tell about them. How do you think these are used?
- Do they differ from the Workbench?
- What are some limitations of this method?
- What are some positivies?