IIIF Image viewing

These are notes for setting up a server and viewer for large images using International Image Interoperability Framework™ (IIIF).

IIIF allows large images to be streamed so they can be viewed more readily using an API rather than just downloading a huge image. IIIF is also an open standard meant to foster the exchange of images and their metadata.[See IIF FAQ.]

IIF needs a server to host the images and stream them, images and a viewer.

IIIF Server: Cantaloupe

I used Cantaloupe for the image server. It’s available on Reclaim Cloud. I opened an account, and selected Cantaloupe from the marketplace to install. See this note from Reclaim.

I uploaded an image called A14660_160.tif to /home/jelastic/images. When I use this URL for the image (https://node8039-env-3549969.ca.reclaim.cloud/iiif/2/A14660_160.tif/info.json) the server responds with JSON. [This URL won’t work if I have turned the server off to save hosting charges. Ping me if you’d like me to turn it on.] The JSON looks like this:

{"@context":"http://iiif.io/api/image/2/context.json","@id":"https://node8039-env-3549969.ca.reclaim.cloud/iiif/2/A14660_160.tif","protocol":"http://iiif.io/api/image","width":10805,"height":10779,"sizes":[{"width":84,"height":84},{"width":169,"height":168},{"width":338,"height":337},{"width":675,"height":674},{"width":1351,"height":1347},{"width":2701,"height":2695},{"width":5403,"height":5390}],"tiles":[{"width":512,"height":512,"scaleFactors":[1,2,4,8,16,32,64,128]}],"profile":["http://iiif.io/api/image/2/level2.json",{"formats":["jpg","tif","gif","png"],"maxArea":100000000,"qualities":["bitonal","default","gray","color"],"supports":["regionByPx","sizeByW","sizeByWhListed","cors","regionSquare","sizeByDistortedWh","canonicalLinkHeader","sizeByConfinedWh","sizeByPct","jsonldMediaType","regionByPct","rotationArbitrary","sizeByH","baseUriRedirect","rotationBy90s","profileLinkHeader","sizeByForcedWh","sizeByWh","mirroring"]}]}

IIIF Image Viewer

Leaflet can be used to view IIIF images. I’ve used Jack Reed’s code to view:

This GitBook is a useful resource https://iiif.github.io/training/intro-to-iiif/.