The Internet Imaging Protocol (IIP) is an API designed for efficient access to multi-resolution images over the internet. The query-string based API is flexible and extensible and allows various forms of image processing to be carried out server-side. The API was originally written by Hewlett Packard, Live Picture, Inc., and the Eastman Kodak Company for the (now defunct) International Imaging Industry Association (I3A). The last I3A-published version of the IIP specification was version 1.05, while information on the latest specification can be found on the IIPImage API documentation page.
OpenSeadragon supports the IIP API through a XMLHTTPRequest request. The IIP tile source accepts the following parameters:
"https://host/fcgi-bin/iipsrv.fcgi" or "/fcgi-bin/iipsrv.fcgi" etc). Note that the host server will need to configure cross-origin resource sharing if OpenSeadragon is hosted on a different domain"image.tif")"jpg", "webp", "png", "avif". default: "jpg")"stack", "quality", "contrast", "color", "invert", "colormap,", "gamma", "minmax", "twist", "hillshade". See API documentation for how to use)OpenSeadragon supports the IIP API from version 6.0.0 onwards.
A basic IIP tile source requires just 2 parameters: the API host end-point iipsrv and the image name image.
Configuration is carried out via the tileSources option. The iipsrv parameter defines the API end-point and the image parameter defines the image file path and name on the host server.
OpenSeadragon({
id: "openseadragon-div",
tileSources: {
iipsrv: "/fcgi-bin/iipsrv.fcgi",
image: "test.tif"
}
});
In this advanced example, the tile format is explicitly requested as well as a transform consisting of a contrast enhancement with a color twist to perform channel recombination.
Configuration is done via the tileSources option. The iipsrv parameter defines the API end-point and the image parameter defines the image file path and name on the host server. In this example, a JPEG tile format is explicitly requested (format: "jpg") and a transform is applied consisting of a contrast enhancement where each pixel value is multiplied by 1.5 (contrast: 1.5) together with a color twist which swaps the output red with the blue channel and renders the final blue channel as the sum of 0.9 multiplied by the original red + 0.1 multiplied by the original blue (twist: "[0,0,1; 0,1,0; 0.9,0,0.1]").
OpenSeadragon({
id: "openseadragon-div",
showNavigator: true,
tileSources: {
iipsrv: "https://your.host/fcgi-bin/iipsrv.fcgi",
image: "images/test.tif",
format: "jpg",
transform: {
contrast: 1.5,
twist: "[0,0,1; 0,1,0; 0.9,0,0.1]"
}
}
});