-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
IIIF Support #2098
IIIF Support #2098
Conversation
Hi Edward, thank you for the PR, I think we'll need to change this logic too: Lines 1380 to 1387 in d5ecc53
Rather than if-else-if-else... we should probably change this whole block to something simpler like the following (untested): baton->tileLayout = static_cast<VipsForeignDzLayout>(
vips_enum_from_nick(nullptr, VIPS_TYPE_FOREIGN_DZ_LAYOUT,
sharp::AttrAsStr(options, "tileLayout").data())); If you're able to add a test or two as well, that would be perfect. |
Please can you target the |
I simplified the tile option parsing in commit 51b1432 on the |
v0.25.0 is now available so I've moved this PR back to the master branch. |
Hi, nice! Do you need anything further from me? I was a bit out of my depth on the c++ stuff and wound up needing dynamic tiling using serverless-iiif (also libvips-based). Looking forward to getting IIIF tiling in Sharp and updating biiif! |
Thanks for the update. Please can you rebase against the latest upstream/master branch and you should see the proposed changes in the PR start to work. If you're able to add a unit test or two as well, that would be great, then we can get this merged and out in the next release. |
I've pushed the beginnings of a unit test and tried the outputted tiles here: https://repl.it/@edsilv/osd-test You can see that some tiles are missing when fully zoomed out. I've also had to add Any chance we could change the default outputted tile format to |
The JPEG suffix logic at https://github.com/lovell/sharp/blob/master/src/pipeline.cc#L936 will need updating to also include |
I had a quick look at this and inverted the JPEG extension logic via commit cf39fc4 to make this a bit simpler, which should hopefully allow you to continue with this PR. |
Have tested that locally and the tiles are now .jpg and the generated info.json works without any modifications. However, I'm getting a timeout error when running |
The "IIIF layout" test is failing as the call to https://travis-ci.org/github/lovell/sharp/jobs/662551580#L1596 |
d'oh - sorry, it was a late night! |
Could libvips/libvips#1530 and/or libvips/libvips#1472 relate to this problem? |
(changing |
The input image |
Yes, I think this might be a libvips thing. Are you able to reproduce it via the command line? vips dzsave input output --layout iiif |
I downloaded v8.9.1 and am getting the same issue via the command line. I suppose we should flag this with libvips? The explanation above still applies. |
Yes please, if you could open an upstream issue in libvips that would be great. It doesn't stop this PR so when you find a moment, please can you uncomment that lovely unit test code, get the assertions passing then we're good to merge, thank you. |
Have fixed the tests and left a comment here: libvips/libvips#1472 (comment) |
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.
Thanks for the updates, a couple of comments inline then this is good to merge.
Marvellous, thank you Edward, this will be in v0.25.2. |
Starting a PR to include libvips' new IIIF support as per: libvips/libvips#1465 (comment)
However, with the changes included in this PR as per #1335 (comment) it doesn't generate the tiles and info.json...
I thought passing the correct layout should now work? e.g.
As far as I understand it, the layout should be getting passed here?
https://github.com/lovell/sharp/blob/master/src/pipeline.cc#L966