Description
Bug report
HDR AVIF input images look very desaturated in the output image. This happens for both srgb
and rgb16
pipeline colorspaces and both srgb
and p3
target ICC profiles. It also occurs when outputting to any of JPEG, WebP, AVIF or PNG (these are the outputs formats I tested).
To Reproduce
Steps to reproduce the behavior:
- Use the raw0016-positive.avif image from this zip
- Convert to any of JPEG, WebP or PNG
- Note the desaturated colors
Expected behavior
When outputting to JPEG or WebP, the colors should be somewhat representative of the input image (minus the HDR, of course). When outputting to 10-bit AVIF, it should have roughly the same colors including HDR.
Actual behavior
The output image is unnaturally desaturated.
Screenshots
Apple Preview:
libvips:
Environment
(please complete the following information)
- OS: Debian Bookworm
- Vips: 8.15.2
- sharp 0.33.3
- libheif 1.15.1 (also tried a build with 1.17.6 with same results)
Additional context
libheif has a convert_hdr_to_8bit
setting that's referenced here, but doesn't seem to be used anywhere.