Skip to content

Add linear color encoding for JXL save operation #2568

Closed
@f1ac

Description

@f1ac

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions