Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support for Ultra HDR#3798

cromefire started this conversation inIdeas
Dec 24, 2023· 2 comments
Discussion options

Ultra HDR is Google's new HDR image format based on JPEG and GainMaps (for compatibility) and newer Pixels actually produce Ultra HDR photos by default now (it's pretty cool!)

But the problem is right now libvips is running into that mentioned compatibility mode, where it's taking the primary image and discarding the GainMap, so any image ever processed by libvips looses its HDR and becomes SDR only (it does copy the metadata already so it's identified as Ultra HDR, but it doesn't work).

Here's some random Ultra HDR image I use for testing (it's a screenshot originally at up to 1000nits, so the HDR isn't limited by the camera):test ultra
Here it is copied (vips copy):test-copy ultra
Here it is flipped (vips flip):test-flip ultra

I hope GitHub doesn't modify them (nope looks good on my phone), because in that case the first one should be HDR on an HDR display using Chrome (Desktop and Android) and then you can just download and inspect them, otherwise I'll just upload them as a zip. And that's the exact problem I'm basically facing. Because as soon as Nextcloud for example (which uses Imaginary, which uses bimg, which uses libvips) touches them, it immediately looses the HDR layer.

That would be the first step, which should probably not require any API changes, the second one (which I don't have any use for right now as I don't build directly on this library but could be pretty useful in the future) would probably be to support Ultra HDR conversion to other formats directly usinglibultrahdr using that you could conceivably convert an Ultra HDR image to an HDR AVIF, JXL or HEIC (or JXR for Windows because they don't seem to support anything else...) image.

You must be logged in to vote

Replies: 2 comments

Comment options

Hi@cromefire,

Sure, this sounds interesting. It looks like support for the extra gain map image could be added pretty easily to the libvips JPEG reader. We could just add an image-valued metadata item calledgain-map (for example) containing the extra information. Generating a float HDR image could then be done in python or whatever using the standard libvips tools.

Let's make this into an enhancement issue.

You must be logged in to vote
0 replies
Comment options

Initial support for HDR JPG with gain maps in libvips:#4645
This includes support for JPG gain maps (a future update to libultrahdr will expand support to AVIF / HEIF)

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Ideas
Labels
None yet
3 participants
@cromefire@jcupitt@gregbenz

[8]ページ先頭

©2009-2025 Movatter.jp