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

Add support for IIIF Image API 3.0 beta #1764

Merged
merged 9 commits into from
Jan 16, 2020

Conversation

lutzhelm
Copy link
Contributor

@lutzhelm lutzhelm commented Jan 7, 2020

Solves #1734.

Of the list in #1734 (comment) all items are implemented, except

  • "The full region is now just max" - this probably refers to the size, not the region. Full / max size has already been addressed with the max size parameter.
  • Splitting the code in several classes for the different API versions

@lutzhelm lutzhelm mentioned this pull request Jan 7, 2020
7 tasks
@eroux
Copy link
Contributor

eroux commented Jan 7, 2020

Thanks! I haven't looked closely at the rest, but the part that modifies the getTileUrl looks good to me

Copy link
Member

@iangilman iangilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic! Thank you for doing this. It all looks reasonable to me, but I'm not terribly familiar with IIIF, so I value others' input. Thank you for including the test module!

data.version = 3;
break;
default:
// unexpected context
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would probably be good to do a $.console.error here. Also, perhaps we should set some sort of default version? Either that or properly error out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added an error message.
I'm not sure I'd be able to suggest a default version. Currently version 2.x is probably the most common version, but I don't know in what situation an image service would fail to provide a correct context URI.
Any suggestion are welcome.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool… Just having an error is probably fine then.

test/test.html Show resolved Hide resolved
@iangilman
Copy link
Member

@eroux Thank you for taking a look!

@azaroth42 Can you take a look as well?

@lutzhelm What are your thoughts on the remaining bits you haven't done? Would you like to get them into this patch as well, or do you think they aren't necessary?

@lutzhelm
Copy link
Contributor Author

@lutzhelm What are your thoughts on the remaining bits you haven't done? Would you like to get them into this patch as well, or do you think they aren't necessary?

  • I'd refrain from splitting IIIFTileSource into separate classes for each version with a common ancestor for now. The code is currently more, but I'm not sure the parts that are not common between versions are that easy to isolate; common parts, on the other hand, should not be copied. Maybe anyone has a suggestion on that.
  • I don't know what @azaroth42 meant by "The full region is now just max". The full size (not region) parameter has been replaced with max for version 3. max was already part of version 2, but it wasn't required to be supported by images services. OpenSeadragon did however already use max instead of full. I found another thing about the size parameter that I mentioned in my comment under the original issue, but that is another issue which I would'nt address in this pull request:

I do (again) wonder if the size parameter should be given as full instead of w, (version 2) / max instead of w,h (version 3) if the requested size has the same resolution as the full image. This would be especially important for level 0 compliant image services.

@azaroth42
Copy link
Contributor

Sorry, I mispoke in haste! the full size parameter is now just max, as @lutzhelm says. full is removed, as it's meaningless when there's also max.

Copy link
Member

@iangilman iangilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new changes look good. It seems this is ready to merge… Would you agree, @lutzhelm, @eroux, @azaroth42? If so, can you take it out of draft, @lutzhelm?

@eroux
Copy link
Contributor

eroux commented Jan 15, 2020

ok for me yes!

@azaroth42
Copy link
Contributor

LGTM! :)

@lutzhelm lutzhelm changed the title [WIP] Add support for IIIF Image API 3.0 beta Add support for IIIF Image API 3.0 beta Jan 16, 2020
@lutzhelm lutzhelm marked this pull request as ready for review January 16, 2020 10:08
@lutzhelm
Copy link
Contributor Author

There we go.

@iangilman iangilman merged commit 898b845 into openseadragon:master Jan 16, 2020
@iangilman
Copy link
Member

Awesome... thank you for doing this!

iangilman added a commit that referenced this pull request Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants