HDR IIIF

At Zeitzeug the owner’s wallpaper collection is being sold and I have secured a particularly bright example…

And since I have a blog, Vorsatzpapier, which also presents old wallpapers, I digitised it. Unfortunately, the luminous character isn’t visible in the original post.

This gave me the idea of trying to provide a HDR (respectively UltraHDR) image in the form of IIIF. The main problem was to split the image into tiles, as common tools only use the SDR representation of the image.

Image Tiler for UltraHDR

Since my blogs initially used iiif_static.py from the Python module iiif (which turned out to be too slow and was also not as easy to marry with JPEG XL as vips), there was already a candidate for the necessary adaptations. In addition, a Python implementation has the advantage that Pillow can be used: The MPO (a JPEG derivative that is structurally related to UltraHDR) implementation has already been used for VintageReality.

It ‘only’ lacked support for writing XMP metadata. For normal JPEG files, it was still quite simple… In the end, I simply wrote a backend based on libultrahdr.

Below is the result.

Next steps

There is currently no standardised way for IIIF to indicate UltraHDR content. In principle, there are fields that can be used for this task, but inclusion in the standard is desirable so that viewer implementations can point this out if the monitor does not support the display.

Result

HDR check

If the test fails, the colours are not as bright. Even if the display of HDR images works, the HDR support for the canvas element needs the browser flag enable-experimental-web-platform-features to be enabled. For example, open “chrome://flags#enable-experimental-web-platform-features” in Chrome to activate it.

The worlds first HDR IIIF image is a 70ies wallpaper!

Update 28.8.2024

There is now a corresponding GitHub Issue to see if there is interest in creating a specification.