Ghost Strips HDR Gain Map

With iOS 18, Apple launched “Adaptive HDR.” This is a system of embedding an HDR representation of an image within an SDR image, allowing HDR support among legacy formats such as JPEG. While Adaptive HDR is Apple’s branding, this technology has existed for several years under Adobe’s Gain Map Initiative, and now a draft ISO standard (ISO/DIS 21496-1).

It appears that this HDR representation gets stripped by Ghost as part of its image optimization step, when it strips EXIF data. By just not stripping that specific data, Ghost should get HDR support for nearly free.

For more details about Adaptive HDR: Use HDR for dynamic image experiences in your app - WWDC24 - Videos - Apple Developer

Hi @sandofsky,

Welcome to the Ghost community! Thank you for bringing this to our attention.

I asked our engineers and understood that the base library we use for image manipulation and optimisation (Sharp) doesn’t (yet) support this. Sharp, in turn, uses Libvips underneath, which also doesn’t seem to offer support to the extent that you’re after.

Libvips have had a similar issue open for quite some time, with lively discussion. It seems browser support for this is still quite spotty.

I think your best bet would be to contribute to the discussion on Libvips—the sooner they integrate it, the sooner we can offer it.

Let me know if that answers your question, or if there’s anything else I can do for you.

2 Likes