-
Notifications
You must be signed in to change notification settings - Fork 10
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
ISSUE-71: Make IABookreader aware of arguments in Image/Service @ids. #73
Conversation
…nts over This commit, for IIIF Display API, item manifests 2.1, uses service @id only if present and passes any arguments the image could have to the Image URI builder (if not uses the given Resource/Image @id as instructed). I'm still doubtfull this is the correct way, i feel we should always, like always use the Image ID. This current behaviour was inherited from the demo code that IABookreader had for IIIF, and it feels wrong. Mostly because, if the IIIF manifest is already pointing to a given Image URL, then making an aditional call to a (maybe not even existing) info.json is overriding the users/creator wishes. Again, the original code was not done by us. In any case, i need to also remove any calls to with and height if there is no service right? Maybe we need to test with some IIIF manifest (public?) where service is not present. @giancarlobi
@giancarlobi some code to discuss here. Let me know what do you think |
@giancarlobi also: In case of lack of image width/height and no service, we can use JS like this function getMeta(url) { |
@giancarlobi also, this is the reason why mirador has issues (same ones). It depends completely on an existing Which basically what we are trying to fix on IABook Reader. Tomorrow i will open an issue in Mirador for a) Static images without a service, pretty sure one is already open (2016 i think i saw something) and something about arguments passed around. Maybe they have an idea... |
@giancarlobi @mitchellkeaney i also updated the manifest https://gist.github.com/DiegoPino/724ce3b703f870acb63c3340c7f9d897 |
@DiegoPino I confirm the fix works (see http://archipelago.byterfly.eu/node/29). |
@DiegoPino Yes, it seems a good solution. |
@DiegoPino as for Presentation API 2.1, Service is not a MUST so I agree with you that the wrong assumption is in Mirador code. |
@giancarlobi i added a comment here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DiegoPino I think we can merge because code solves main issue. Maybe open a new issue to solve width issue?
Regarding this @giancarlobi reason for calling it with 1200 is because i assume we could to limit the access to a certain size (imagine the call is really to someurl/somefixedsizeimage.jp2) but also because the canvas width and height we need (by specs) are the aspect ratio. So with 1200 Javascript will be faster! (can be even super smaller) and we will get whatever height and then we can calculate the ratio. But yes, FULL can work, just slower. Does that make sense? |
@giancarlobi yes! we can merge and then deal in another issue with sizes and the fact that we are always calling the info.json. Does it still work with normal manifests based on images after the change? I'm pretty good at breaking working code! jajajjaa |
@DiegoPino Yes!! Still works with standard book by Tiff and book by manifest, great!! |
@DiegoPino I understand, I was thinking into absolute values while we only need ratio, am I right? |
@giancarlobi thanks so much for reviewing. Will open a new issue to handle IIIF Presentation Manifests without a service and the JS driven height/width to make the CANVAS/HTML/JAVASCRIPT/CSS God happy! 👍 Gracias!! |
See #71
What is new here?
We use non standard IIIF extensions to be able to parse PDF pages from a single File as individual images. But in the IABookreader IIIF plugin we use the
service @id
of each image resource to build a full size image URL on the fly, to allow larger than desired Image sizes and zoom. NOTE: not sure that is really a good idea, we used the code IABookreader had for that and now looking this back in time it feels wrong.In any case, by using the service URI we dismiss any argument, like
?page=1
that could be passed, which includes also video frame times, etc. This pull changes that by parsing out of the Image ID any arguments that could be passed and appending them to the final Image ID (URL) that is being built. This, in case of the absence of aService
and its@id
we also know call directly the Image ID.This needs some testing and also rethinking some IAbookreader logic, since we do ask for image sizes dynamically, but in the absence of a Service info.json, that makes no sense at all.