Support IIIF Image API
cmahnke opened this issue · 8 comments
See #63, there has to be an internal IIIF Image API implementation in order to work, it should be exposed to the user on demand.
How would you pass the image to the Viewer? Just the plain image or info.json
?
The first step would be to transparently support the info.json
as in the original issue: Just check if the manifest
parameter is either an Image API or Presentation API endpoint and act accordingly.
The second step would be a baseURI
parameter in the tifyOptions
dictionary, this would allow passing Image API endpoints with relative identifiers / URLs.
The third step would be the possibility to just pass plain images with an additional parameter instead of manifest
.
So, instead of the manifest
-Parameter we could use an image
parameter with the link to the info.json
and hide all panels and only display the image?
Well, using just another param was the least favourable option. It should be quite easy to implement...
That's the main benefit, the drawback would be that the user would have to decide, which kind of API he's be dealing with. Doesn't sound like a good idea to me...
So the steps are:
- see which type of IIIF API is requested (
@protocol: http://iiif.io/api/image
orhttp://iiif.io/api/presentation/2/context.json
) and then switch accordingly whether Image or Presentation API is displayed. Alsohttps://
should be valid in the protocol - if only Image API is used, put the image on the OpenSeadragon, if Presentation is used, put all panels and launch the fully fledged viewer
- You seem to mix up
@context
and@protocol
. And consider using String.startsWith() to be version agnostic, since the underlying viewer implementation might also support other API versions for the Image API.