example: iiif tiles support

The International Image Interoperability Format is described formally here http://library.stanford.edu/iiif/image-api/.

The IIIF API specifies a web service that returns an image in response to a standard http or https request. The URL can specify the region, size, rotation, quality characteristics and format of the requested image. A URL can also be constructed to request basic technical information about the image to support client applications. The IIIF API was conceived of to facilitate systematic reuse of image resources in digital image repositories maintained by cultural heritage organizations. The API could be adopted by any image repository or service, and can be used to retrieve static images in response to a properly constructed URL.

OpenSeadragon has added support for IIIF thanks to several of its specifications authors as well as the gist provided by Jon Stroop at this gist. The tile source reference in this page are not meant for general public consumption without individual consideration of potential copyright infringement.

Inline Configuration for IIIF tile sources.

Inline configuration is very straight forward. The tile source type is identified by it's profile attribute an must specify the url of the tile service with the tilesUrl attribute.

Example Inline Configuration for IIIF

In this example we also specified the 'preserveViewport' option to retain the viewport zoom and position when changing pages.

OpenSeadragon({
    ...
    preserveViewport: true,
    tileSources:   [{
        "tilesUrl":     "http://img.princeton.edu/loris",
        "identifier":   "pudl0001/4609321/s42/00000001",   
        "width":        2617,   
        "height":       3600,   
        "scale_factors": [1, 2, 3, 4, 5],   
        "tile_width":   256,   
        "tile_height":  256,   
        "formats":      [ "jpg", "png" ],   
        "qualities":    ["native", "bitonal", "grey", "color"],   
        "profile":      "http://library.stanford.edu/iiif/image-api/compliance.html#level1"
    }...,{

    ...//more tile sources

    }]
    ...
});