-
Notifications
You must be signed in to change notification settings - Fork 56
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
Indicating (technical) rendering hints for HDR content to viewers #2312
Comments
Thanks for such a well researched, well explained and well implemented suggestion! Understanding that it's backwards compatible with jpg, and indeed doesn't have a separate media type or file extension (which I think is an odd choice, but not ours to make), I feel that in the IIIF view of the world, it's a different quality. My rationale:
If the above is accurate and convincing, it would mean {
"extraQualities": ["ultrahdr"]
} Secondly, in thinking about the viewer requirements, it seems like this would need to be reflected into the Presentation API somehow, so that the viewer knows to do the UltraHDR tests and setup. I think this is fine without change to the API, as the functionality is tied to the image, and the annotation can embed information from the image service's info.json. Thus the above would be part of the ImageService block in the Manifest. Thoughts? |
I like @azaroth42 's idea of treating HDR as a quality rather than a feature. I would really like to extend this to colorspaces outside of sRGB, as @cmahnke also hinted to. I recently implemented support for bigger colorspaces in digilib where it is currently only accessible through the native API: https://dh-tech.github.io/blog/2023/01/16/java-color-profiles/ (also viewers seem to have even less control about how the browser and the OS handle this) I also don't know if "more-than-srgb" colorspace would be a separate quality from "ultrahdr" and what to do about about combinations of both... |
@azaroth42: My rationale to use Another remark would be that On the other end there are HDR initiatives for other formats, like PNG as well. Another, although made up, example would be TIFF with high bit depth (in Rec. 2020). To be able to combine As to the question regarding "upscaling" or how I called it "spicing images up": This is definitely possible, either programmatically or via a UltraHDR capable graphic program. |
The gain map approach to SDR <-> HDR conversion looks really interesting. I'll look into adding support for this in IIPImage, especially as there will presumably be published specs for including gain maps into other formats once the ISO standardization process for gain maps has completed. Adding support will be non-trivial, though, as when you modify the image through resizing or rotation etc, you also need to modify the gain map image (which doesn't necessarily have the same resolution) in the same way. For IIIF, So, if we introduce a If you now request
I presume the user would prefer the latter if requesting an AVIF image. Perhaps, in practice, it will depend on what the source image consists of. If it's natively in 8 bit + gain map form, it will be easier for the server to output in the same form. Whereas if the source image is in native HDR form, the server will output to native HDR if the format supports this, or will have to transcode to 8 bit + gain map if it doesn't. This raises the issue of bit depths in general, though. This is a separate discussion, but if the IIIF In fact, on the image server side, I can see the use of gain maps as being something useful for improving the handling of high bit-rate images in general. IIPImage, for example, simply scales 16 or 32 bit source images down linearly to 8 bits per channel so that they can be output as JPEG. If the image included a gain map (which can also be used to go from HDR to SDR), this would allow a more sophisticated tone-mapping to be done when going down to 8 bits.
The approach IIPImage takes here is simply to avoid unnecessary color space conversion: if the source image has a DCI-P3 ICC profile, just use the raw pixel values and copy the profile across (sure, ideally all image processing should be carried out in linear space, but this adds a lot of overhead). All current web browsers nowadays fully support ICC profiles, so images should be rendered correctly (in theory!). If, however, we want IIIF servers to perform color space conversion, then, yes, we'll need a way specify this as a |
Just a small update: Everyone knowing to have a working HDR setup but didn't get the example to work: I was under the misconception, that Chrome enabled this feature by default in June - this isn't the case. |
Yesterday I had the opportunity to give a lightning talk essentially on this topic at the 2024 online meeting. |
Abstract
This proposal is about indicating technical rendering hints (for HDR images in the UltraHDR format) to Image API Clients.
Background
As a proof of concept I've created a static Image API endpoint delivering HDR enable content, you can read more about it and have a look in my blog.
Since it's only a PoC it shows a 70s wallpaper, since it's from my domain, there are other use cases for HDR scientific images, like:
The tiles aren't just JPEGs, but UltraHDR images. This format allows to add a so called gainmap to the image. To be backwards compatible the format is still JPEG with an embedded image, as specified in MPO.
Keep in mind that you'll only see a SDR image, if the requirements (see below) aren't meet. This is actually a feature since it allows transparent fallback if those aren't provided (this is also a reason for this proposal: a Viewer needs to know whether it should hinting those requirements).
Displaying UltraHDR images needs to have the following requirements to be fulfilled:
Currently the combination of a Apple Silicon notebook or desktop and Google Chrome is the most likely working combination. Windows devices usually need to have HDR enabled explicitly. Have a look at the page created by photographer HDR evangelist Greg Benz.
Since the HDR support of the browser (currently) needs a specific initialisation of the viewer, some sort of indicator / flag is needed to:
canvas
)Possible solutions
Current implementation: Using
supports
of Image API 2.0Since the current implementation is using the Python module
iiif
with a custom tiler backend the example uses the Image API 2.0. This allows to usesupports
with the URIhttps://christianmahnke.de/iiif-hdr/
.Image API 3.0
In Image API 3.0 the best field is certainly
extraFeatures
.Summary
Further questions / discussion
format
(orextraFormats
), this is of cause open for discussion.The text was updated successfully, but these errors were encountered: