Skip to content

Conversation

@ri-char
Copy link

@ri-char ri-char commented Nov 29, 2025

This PR adds UHDR image support, leveraging the newly introduced UHDR functionality in libvips (see libvips/libvips#3799). Closed #4314.

New Public Functions

uhdr

uhdr([options]) ⇒ Sharp

Use these UHDR options for output image.

Param Type Default Description
[options] Object output options
[options.quality] number 80 quality, integer 1-100

keepGainmap

keepGainmap() ⇒ Sharp

Keep Gainmap for uhdr image from the input image in the output image. This is the defualt behaviour for uhdr input.

noGainmap

noGainmap() ⇒ Sharp

Remove gainmap from the input image in the output image.

@ri-char ri-char marked this pull request as ready for review November 29, 2025 09:42
@lovell
Copy link
Owner

lovell commented Dec 12, 2025

Hello, thank you very much for taking the time to submit a PR - it provides a great start to help people manage images with gain maps.

I intend to take the integration with Ultra HDR much deeper, including it in prebuilt binaries, and supporting gain map scaling/manipulation when resizing/cropping etc. This also means I should probably think more about how this is exposed/implied in the API. I'll create a separate tracking issue with thoughts.

@ri-char ri-char closed this Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please add support for HDR JPG gain maps

2 participants