HDR image export which can be viewed in a browser? #5441
-
Is there a way to use ImageMagick to convert a 32-bit (HDR) TIF into any image format which can still be viewed as an HDR image on any browser? I've been able to use ImageMagick to convert to JXL, but it shows as clipped (no HDR content) in FireFox and Chrome. When I reverse convert the JXL back to TIF, I do see the HDR content, so it looks to me like JXL image support in these browsers does not include HDR image content. I believe AVIF can support HDR content. However, when I try to convert using ImageMagic (command line: magick "my source file.tif" - depth 32 "my new file.avif"), the result is a 16-bit channel depth (as reported using: magick identify -verbose). When I reverse it back to a 32-bit TIF, the result is clearly clipped, so I'm pretty confident my AVIF conversion failed. Is an HDR-compatible export from ImageMagick not possible? Running "magick -version" reports "ImageMagick 7.1.0-45 Q16HDRI...", which I believe should support HDR conversions. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 20 replies
-
Do you have an HDR monitor? If not, then some software (or hardware, I suppose) will need to convert the HDR image to SDR to display the full tonal range on your monitor. JXL can record HDR values. For example, I can do a round-trip on Windows:
Another option that is sometimes required for writing HDRI is I don't know about AVIF. AVIF doesn't work for me (IM v7.1.0-42 on Windows 8.1).
|
Beta Was this translation helpful? Give feedback.
-
As of October 2021, Firefox apparently didn't support HDR. See https://support.mozilla.org/en-US/questions/1321197 AVIF on Chrome seems more promising. See https://stackoverflow.com/questions/51936897/how-does-one-create-and-display-hdr-images-in-web-browsers |
Beta Was this translation helpful? Give feedback.
-
Sorry, I don't use AVIF for anything, and can't advise. |
Beta Was this translation helpful? Give feedback.
-
We currently only support writing 8, 10 or 12 bit heic and avif images. |
Beta Was this translation helpful? Give feedback.
-
@gregbenz check out my complete end-to-end workflow for an HDR image in Chrome: https://sturmen.github.io/posts/hdr-jpeg-xl-2022/ |
Beta Was this translation helpful? Give feedback.
-
Sorry I didn't use this please tell me about this I want to experience. |
Beta Was this translation helpful? Give feedback.
-
Any progress on that? it seems like AVIF is the way to do HDR images because Chrome disabled JPEGXL support. |
Beta Was this translation helpful? Give feedback.
-
Closing out this thread as there are now several formats which support HDR in multiple browsers. Most browsers now support both HDR JPG gain maps as well as standard HDR AVIF (Chrome has support for AVIF gain maps, and so does Brave under a developer flag: brave://flags/#avif-gainmap-hdr-images). Gain maps are clearly the way to go, as they offer superior image rendering on SDR (non-HDR) displays. JPG gain maps are clearly the best option at this time as they offer true HDR display, superior SDR display, and full backwards compatibility (browsers which don't understand gain maps fall back safely to the SDR version of the image). Unfortunately, ImageMagick does not support gain maps. A feature request has been submitted here: #6377 |
Beta Was this translation helpful? Give feedback.
Closing out this thread as there are now several formats which support HDR in multiple browsers. Most browsers now support both HDR JPG gain maps as well as standard HDR AVIF (Chrome has support for AVIF gain maps, and so does Brave under a developer flag: brave://flags/#avif-gainmap-hdr-images). Gain maps are clearly the way to go, as they offer superior image rendering on SDR (non-HDR) displays.
Info on gain maps: https://gregbenzphotography.com/hdr-images/jpg-hdr-gain-maps-in-adobe-camera-raw/
JPG gain maps are clearly the best option at this time as they offer true HDR display, superior SDR display, and full backwards compatibility (browsers which don't understand gain maps fall back …