-
Notifications
You must be signed in to change notification settings - Fork 115
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
Fully support for IIIF info.json #234
Comments
For IIIF Auth, you need to add a "service" section to the info.json output. Perhaps we could add a startup parameter like IIIF_AUTH or something more generic like IIIF_EXTRA_INFO to allow you to inject arbitrary extra json into the info.json? Would that be enough? For WebP and PNG, this is already available in the current Github source code and will be available in version 1.2, which will be released this autumn. |
Thanks for clarification. I pulled the latest version to try webp. However the result is unstable. That is some tiles display ok while others display in blank. I opened one of the blank image and found some information that might help to resolve. RIFF�� WEBPVP8X <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="3.1.1-112"> |
default.webp.zip |
2022-08-20_23-11-12.mp4 |
Can you send me the TIFF image that you are using with iipsrv? And also give me an example of a tile request URL being sent to iipsrv that returns a buggy webp image. |
This works fine on my machine with the request: What does it say in your iipsrv log when you open this URL? By the way, you don't need to compress your TIFF files with WebP to be able to output in webp format. iipsrv transcodes from any TIFF compression to any of the supported output formats. |
TileManager getRegion :: Total tiles in image: 6x5 tiles |
Thanks for your advice. Just wondering is there some performance penalty if the tif is encoded in format other than webp, but output as webp? |
The log output looks like it's correctly outputting the WebP file. If you open your URL https://localhost/i/3/9a0710ad4dc651a3a02e5d20f9e1f9c5/5120,1024,712,1024/356,512/0/default.webp directly in a browser, does it work? If not, perhaps you have an old version of libwebp? What OS and version is the server running on?
iipsrv will decode from whatever compression you have used, then re-encode into the requested format, so there is no performance advantage in your scenario. You do, on the other hand, get a smaller TIFF file when using WebP compression. If you want maximum speed, use uncompressed tiled pyramid TIFF, though this will result in much larger files. |
Thanks for detailed explanation. You are correct that the problem lies in libwebp or chrome side. I will investigate further. |
Can you open this IIP. generated webp from your computer? I failed to display it in both my PC and mac. |
You didn't properly upload your webp file ... |
Sorry, I couldn't the image any more. Thanks a lot for all the following up till now. |
Is it possible to add a parameter to control whether it is http or https in 'id' field of IIIF info.json. I saw the BASE_URL param, but it is only enough when mapping happened in rewrite rule, such as rewrite "^/i/2/(?.{1})(?.{3})(?.*)(?jpg|webp|json)$" /fcgi-bin/iipsrv_2.fcgi?IIIF=$c1%2f$c1$c3%2f$c1$c3$cn$ext;" |
BASE_URL allows you to define a static Host URL for the IIIF info.json id field. This works irrespective of whether you do URL rewriting or not. It is, however, fixed for all requests, so won't work if you want to set this on a per-request basis. |
Line 197 in ef1ce8a
If you set this on your frontend (where your request is coming from) and then set it as a header to your IIP server, it will pick up on it and pass it through. So if you request:
And then proxy this to IIP as:
|
Thanks for the reply. I used fastcgi paramter https on/off to fix it. |
Yes, if you're using Nginx, that would indeed be an elegant and simple way to do it! |
First of all, thank you for this wonder tool. It supports IIIF 3.0/2.0 quite well till now. However, now I found it necessary to use info.json in certain case where customization is needed, for instance, to support IIIF auth. Is it possible to give me flexibility in customizing info.json instead of generating it automatically. Also more diversified image support is needed, such as png and webp, as the image format in IIIF url.
The text was updated successfully, but these errors were encountered: