Sample problematic HDR JPEG XL, PNG and JPG files
Here are three problematic image files, found here:
Original JPEG XL file can be found in the last URL ^. PNG and JPEG was created with JPEG XL v0.11.1.
- PNG was created with:
djxl imagetest15-Q70.jxl output.png - JPEG with:
cjpegli imagetest15-Q70.jxl output.jpg --quality=90 --xyb --chroma_subsampling=444
Screenshot with vipsdisp v3.1.0 on Windows:
JXL and PNG (left and center) should be brighter. The JPG (right) is really messed up.
- JPEG is XYB color space and embedded ICC, I think (i'm not an expert on this).
Seems color management isn't working, the XYB JPEG is a common sight where the ICC is unsupported
The JPEG XL and PNG images display correctly when I select the Enable colour management-option in the control menu.
The issue with XYB JPEGs will eventually be resolved (see https://github.com/libvips/libvips/issues/3475), as those ICC profiles do not support the relative intent that libvips picks by default. As a possible workaround, we could always use the perceptual intent in vipsdisp. For example:
--- a/src/tilesource.c
+++ b/src/tilesource.c
@@ -538,7 +538,9 @@ tilesource_rgb_image(Tilesource *tilesource, VipsImage *in)
*/
if (tilesource->active &&
tilesource->icc) {
- if (vips_icc_transform(image, &x, "srgb", NULL))
+ if (vips_icc_transform(image, &x, "srgb",
+ "intent", VIPS_INTENT_PERCEPTUAL,
+ NULL))
return NULL;
VIPS_UNREF(image);
image = x;
Thanks @kleisauke. I actually looked for color management options, but could not find it in the only visible hamburger menu that is visible by default. 😅
PR https://github.com/libvips/libvips/pull/4347 should fix the issue for XYB JPEGs.
We now have libvips 8.17 and vipsdisp 4.0, so I think this is all working.