IIIF implementation

Published: Dec 10, 2021 by Steve Baskauf

In connection with uploading files to Wikimedia Commons as part of our WikiProject Vanderbilt Fine Arts Gallery, I’ve been working on the details of uploading images to the Vanderbilt LibrariesCantaloupe International Image Interoperability Framework (IIIF) server and providing IIIF manifests to describe them.

This required working out a number of technical details. Making the images available to the server required uploading them to an AWS S3 bucket. This was done using the boto3 library of the AWS Python SDK as part of the Commonsbot script I use to upload images to Commons.

While doing the image upload, I also created a simple JSON IIIF manifest for each image, based on the pattern used by the National Gallery of Art with images they’ve uploaded to Commons. The manifests are served directly from another S3 bucket and are also generated and uploaded by Commonsbot.

With the image accessible from the IIIF server and the manifest in place, I could then create a link to the manifest in the Wikidata item for Public Domain works in the Fine Arts Gallery using the P6108 “IIIF Manifest” property. There is a user script that enables an embedded Mirador IIIF viewer when a Wikidata user adds the line

mw.loader.load( '//www.wikidata.org/w/index.php?title=User:Btwashburn/iiif-mirador.js&action=raw&ctype=text/javascript' );

to their common.js page. Once the user script is enabled, the viewer automatically displays the image for any item with a P6108 property, such as https://www.wikidata.org/wiki/Q103306985. This is cool because you can zoom into details on the image as shown above.

One issue that was difficult to work out was converting the high resolution TIFF images from the format produced by the imaging camera to the “tiled pyramidal” format required by the IIIF server to serve smaller versions or closeups of the image quickly. (For a good explanation of image pyramids, see the first part of this video.) After trying a bunch of different methods to script the conversion, I was finally successful using command line ImageMagick for Mac based on the examples in this post. I was able to script the conversion in Python using these statements:

import os
os.system('convert 1979.0342P.tif -define tiff:tile-geometry=256x256 -depth 8 ptif:1979.0342P_tiled.tif')

where 1979.0342P.tif is the name of the file to convert.

Share

Latest Posts

Humboldt Extension for Ecological Inventories Published
Humboldt Extension for Ecological Inventories Published

The Humboldt Extension for Ecological Inventories is a new metadata vocabulary that extends the Darwin Core Standard to make it possible to describe the inventories and sampling events that are used to collect organism occurrence data. This is the largest extension to Darwin Core since the original vocabulary was ratified in 2009 and it represents over three years of work by the Humboldt Extension Task Group. This group of international experts met weekly over that time period to develop the vocabulary, carry out implementation testing, and publish the vocabulary and associated documentation.

Camtrap DP paper published
Camtrap DP paper published

Camera trapping is an increasingly important method used by ecologists for monitoring animals in the wild. Camera trap data has previously been difficult to publish by conventional means, since the data includes many related images or videos that must be associated with the occurrence data. The new Camtrap DP standard provides a way to package camera trap data based on the open Frictionless Data Package specification. Camtrap DP datasets can be easily exchanged or published to the Global Biodiversity Information Facility (GBIF) where the included occurrence data will be integrated with biodiversity data collected by other means.

Nine hundred images added to Wikimedia Commons from ACT
Nine hundred images added to Wikimedia Commons from ACT

Charlotte Lew and I have been working for some time to improve access to images in the Art in the Christian Tradition database by linking descriptive metadata in Wikidata to the corresponding artwork images in Wikimedia Commons. In the first part of the project, we were primarily cleaning up and linking Wikidata metadata to images that were already in Commons.