Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow IIIF Manifests without an Image Service or with static images to work on IABookreader/Mirador #74

Closed
DiegoPino opened this issue Mar 31, 2020 · 8 comments
Assignees
Labels
enhancement New feature or request external bug It is not us, it is them IIIF Specs/Manifests/Implementations Javascript Favourite language of a PHP developer
Milestone

Comments

@DiegoPino
Copy link
Member

Related to #71

What is needed?

Now that PDF serving via IIIF is fixed on IABookreader we need more!

Given the fact that on JS we work on a Browser/HTML/CSS World, we need to know the width and height of the images we serve via IIIF always, to scale things and display them correctly. In the absence of an Image Resource Service definition in a IIIF Manifest, we have no access to a info.json, which means we can not get the size.

Solution is to either push size/width for every image from the SBF JSON into the IIIF Manifest when creating the Twig Template (we need SBF Runners for that) but in the case of a PDF that is serving pages via an Cantaloupe argument, that is not possible.

Solution: use JS!

#73 (comment)

This will need to be either ported to Mirador 3 too, see my comment at the end of

ProjectMirador/mirador#2616

@giancarlobi

@DiegoPino DiegoPino changed the title Allow IIIF Manifests without an Image Service or with static images on IABookreader Allow IIIF Manifests without an Image Service or with static images to work on IABookreader Mar 31, 2020
@DiegoPino DiegoPino self-assigned this Mar 31, 2020
@DiegoPino DiegoPino added enhancement New feature or request external bug It is not us, it is them labels Mar 31, 2020
@DiegoPino DiegoPino added this to the 1.0.0-beta3 milestone Mar 31, 2020
@DiegoPino DiegoPino added IIIF Specs/Manifests/Implementations Javascript Favourite language of a PHP developer labels Mar 31, 2020
@DiegoPino
Copy link
Member Author

@giancarlobi i was thinking loud there, that maybe a work around is to have an internal, Archipelago Only info.json endpoint for this cases. I don't think we can expect our use case to be fixed on any other viewer, but i do want to have this feature.

So, if i can expose an info.json endpoint for our own files, like under https://github.com/esmero/format_strawberryfield/blob/master/format_strawberryfield.routing.yml#L53

The trick here would the following, We do return the same info.json as cantaloupe (if there is one) but we change the base URI to our own wrapper that uses ?arguments as part of the ID? and we do allow/pass around the GET arguments, and only the ones we trust. What do you think? Too crazy?

@giancarlobi
Copy link
Collaborator

@DiegoPino I fully agree we don't have to wait a fix and yes we want this feature.
We have manifest (of PDF) with:
A) Resource -> @id : URL with ?page that is working with Cantaloupe
B) Resource -> Service -> @id : URL with ?page DOESN'T return info.json
So we have to solve B) issue by:

  1. modify manifest Resource -> Service -> @id with an URL pointing to our Archipelago custom endpoint
  2. expose Archipelago custom endpoint to return right info.json for PDF paged object.
    Did I understand your idea? I think is a good solution!

@DiegoPino
Copy link
Member Author

@giancarlobi yes! That is the idea. for PDF and Video (where the argument is a timecode)

@DiegoPino
Copy link
Member Author

@giancarlobi also 👀
cantaloupe-project/cantaloupe#359
Seems like we will get a fix for that!! SUPER!

@giancarlobi
Copy link
Collaborator

@giancarlobi also eyes
cantaloupe-project/cantaloupe#359
Seems like we will get a fix for that!! SUPER!

@DiegoPino That would be great because it makes solution really more simple.

@DiegoPino DiegoPino changed the title Allow IIIF Manifests without an Image Service or with static images to work on IABookreader Allow IIIF Manifests without an Image Service or with static images to work on IABookreader/Mirador Apr 17, 2020
@DiegoPino
Copy link
Member Author

@giancarlobi heads up on this! ProjectMirador/mirador#2976
Mirador now supports level-0 resources for IIIF Presentation API V2 Manifests. This is great news! Now, i still need to wait this to be tagged into one of the Beta versions so we can use it (For our beta3) but this moves things forward quite fast. Still, i will be working on our own info.json wrapper for book pages.

@giancarlobi
Copy link
Collaborator

@DiegoPino I write here because correlated to this. I tried to call OSD with a static inline configuration as here (https://openseadragon.github.io/examples/tilesource-iiif/) and with @id pointing to cantaloupe image url + ?page=N (i.e. http://some.url/myfile.pdf?page=5) but OSD when generates tile source url adds features after ?page=N (i.e. http://some.url/myfile.pdf?page=5/full/1200,/0/default.jpg instead of before ?page=N (i.e. http://some.url/myfile.pdf/full/1200,/0/default.jpg?page=5). This last format works well with cantaloupe.
Currently IAB is working well with PDF and Cantaloupe, it seems an issue with OSD.

@DiegoPino
Copy link
Member Author

Not longer an issue but we can revisit if a specific manifest has problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request external bug It is not us, it is them IIIF Specs/Manifests/Implementations Javascript Favourite language of a PHP developer
Projects
None yet
Development

No branches or pull requests

2 participants