Cantaloupe IIIF Image Server
IIIF Standard
Cantaloupe IIIF Image Server is for hosting images using the IIIF standard. Before using this application it is necessary to learn about this standard. IIIF is a set of open standards for delivering high-quality, attributed digital objects online at scale. It’s also an international community developing and implementing the IIIF APIs. IIIF is backed by a consortium of leading cultural institutions.
With IIIF image sizing, data can be stored and accessed across different platforms using an API. To get started with IIIF see their guides: Get Started with IIIF and How IIIF Works
Install Cantaloupe IIIF Image Server
If you are ready to install Cantaloupe IIIF Image Server, check out this guide: Installing Cantaloupe Image Server on Reclaim Cloud
Cantaloupe Admin panel
With Cantaloupe IIIF Image Server users can configure images for IIIF using an Admin Panel. The different sections are summarized below. See their guide for full details here (Version 4.1 for this article, but you can switch to a different version): Cantaloupe Getting Started Manual (4.1)
Logging In to Admin
- Login it the admin panel by navigating to https://<your-env-url>/admin. In all these examples replace <your-env-url> with the url of your environment such as pj-cantaloupe.us.reclaim.cloud/admin.
- Use the username admin and the password generated when installed or stored.
Status
The Status section shows the Memory used, Proxy Headers, Internal Caches and VM information.
Application
The Application sections shows the location of logs and additional scripts.
HTTP
The HTTP section shows the port used and settings for HTTPS.
Endpoints
The Endpoints section has settings to view specific API endpoints (in a browser, for example). View the examples at https://<your-env-url>/iiif/2. Replace the url with your actual environment url followed by /iiif/2 (for API 2.x).
To see the Sample Requests listed, replace the {identifier} with the file name of the image used. See this running API page example: https://pj-cantaloupe.us.reclaim.cloud/iiif/2
Sample Requests, running examples:
- https://pj-cantaloupe.us.reclaim.cloud/iiif/2/eddie.jpg/info.json
- https://pj-cantaloupe.us.reclaim.cloud/iiif/2/eddie.jpg/full/max/0/default.jpg
Source
Sources provide access to source images, translating request URI identifiers into a source image locators, such as pathnames, in a particular type of underlying storage. After verifying that an underlying object exists and is accessible, a source can then provide access to it to other application components in a generalized way.
Processors
Processors read images from sources, decode them, transform them according to request arguments, and encode and write derivative images back to the client. Processors can be selected in different ways per-request.
Different processors use different underlying codecs and image processing engines, which may have different quality, compatibility, dependency, performance, and licensing characteristics. The ability to choose among different processors is intended to make it straightforward to add support for new image formats; improve support for existing image formats via the substitution of better codecs; and decouple the image server implementation from any one codec.
Caches
Cantaloupe offers a sophisticated and customizable caching subsystem that is capable of meeting a variety of needs while remaining easy to use. Several tiers of cache are available:
- Client-side caches, which it has no control over but can provide hints to;
- A source cache, which caches source images on a local filesystem (if they are not already on one) for faster reading;
- A derivative cache, which caches processed images and source image characteristics;
- An info cache, which caches source image characteristics in memory.
Overlays
The overlay feature overlays an image or text string on top of a derivative (output) image. This can be useful for description, branding, attribution, copyright notices, and so on.
With both types of overlays, the position, inset, and output width/height threshold (below which the overlay won't be displayed) are configurable.
Not all processors support overlays; see the table of supported features.
Configuring Cantaloupe to use your images.
This section follows this tutorial: Setting up Cantaloupe Server
Congrats now you have your image server up and running! We need to feed it some images to keep it happy! In these examples, replace <your-env-url> with the url of your actual environment for example: pj-cantaloupe.us.reclaim.cloud.
Download some images
Go ahead and download a *.jpg
image from the Internet into your Cantaloupe directory: /home/jelastic/images/. This is the Reclaim Cloud default image location for Cantaloupe but another location may be used. Here is one: eddie.jpg that you can use. If you use a different image and file name, change eddie.jpg to the actual file name used to view in these examples.
Configure Cantaloupe to use the correct path
Now we need to configure Cantaloupe to use that image directory.
- Navigate to the admin page http://<your-env-url>/admin.
- Click on Source, then click FilesystemSource tab at the bottom of the page.
- Next check or fill in Path Prefix to be /home/jelastic/images/ or another directory if you prefer.
- And finally, click Save if you make any changes.
Check it out in the browser
Now you should be able to navigate to an image's info.json response successfully.
Checkout http://<your-env-url>/iiif/2/eddie.jpg/info.json. Edit your actual environment url, and the path and file name as needed if using a different API version or image.
And if everything goes right, you should see an info.json response. See running example: https://pj-cantaloupe.us.reclaim.cloud/iiif/2/eddie.jpg/info.json
Let's finally check it using the Leaflet-IIIF image api viewer.
Try this url: http://mejackreed.github.io/Leaflet-IIIF/examples/?url=http://<your-env-url>/iiif/2/eddie.jpg/info.json. See running example: http://mejackreed.github.io/Leaflet-IIIF/examples/?url=http://pj-cantaloupe.us.reclaim.cloud/iiif/2/eddie.jpg/info.json
Notice how we added our local IIIF server's info.json response url as a parameter. This is used by IIIF Image API clients to understand how they can request images/tiles.
You can also try this image with:
- OpenSeaDragon: http://iiif.gdmrdigital.com/openseadragon/index.html?image=
- http://iiif.gdmrdigital.com/openseadragon/index.html?image=http://<your-env-url>/iiif/2/eddie.jpg/info.json. See running example: http://iiif.gdmrdigital.com/openseadragon/index.html?image=http://pj-cantaloupe.us.reclaim.cloud/iiif/2/eddie.jpg/info.json