Closed
Description
Currently JxlColorEncodingSetToSRGB() is always used in jxlsave.c, but it seems calling JxlColorEncodingSetToLinearSRGB() would be more appropriate when input image has VIPS_FORMAT_FLOAT and/or VIPS_INTERPRETATION_scRGB. Currently exported linear images appear as if they have additional gamma of 2.2 applied to them because of this issue.
Libjxl tests seem to follow this logic (float input means linear output when input file has no ICC profile) at https://github.com/libjxl/libjxl/blob/main/lib/jxl/roundtrip_test.cc