Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Galaxy4594
Copy link
Contributor

@Galaxy4594 Galaxy4594 commented Nov 14, 2025

Basically, it changes the default transfer curve from Linear to sRGB since that's what's usually expected of image viewers and is implied by the docs.

The dithering when decoding to 8-bit was masking the banding, but it's still quite visible since 8-bit linear is quite bad.
all-fixed-now

Fixes #2289
It also addresses these as well:
Fixes #2147
Fixes #4307
Fixes #4511

@eustas
Copy link
Contributor

eustas commented Nov 20, 2025

DecodeTest.IccProfileTestXybEncoded fails

@eustas eustas added the CI:full Label to attach to a PR to run the full CI workflow and not just the regular PR workflows label Nov 20, 2025
@Galaxy4594
Copy link
Contributor Author

Tests should be fixed

@goodusername123
Copy link

The docs seem to imply (unless I'm understanding wrong) that LinearSRGB be/is used when outputting to a floating point format and that SRGB be/is used when outputting to a integer format. however in practice it looks like the same thing ends up getting used for both, meaning that this PR doesn't solve the core issue and instead only shifts the problem around?

https://libjxl.readthedocs.io/en/stable/api_metadata.html#_CPPv4N12JxlBasicInfo21uses_original_profileE

JXL_BOOL uses_original_profile

Whether the data in the codestream is encoded in the original color profile that is attached to the codestream metadata header, or is encoded in an internally supported absolute color space (which the decoder can always convert to linear or non-linear sRGB or to XYB). If the original profile is used, the decoder outputs pixel data in the color space matching that profile, but doesn’t convert it to any other color space. If the original profile is not used, the decoder only outputs the data as sRGB (linear if outputting to floating point, nonlinear with standard sRGB transfer function if outputting to unsigned integers) but will not convert it to to the original color profile. The decoder also does not convert to the target display color profile. To convert the pixel data produced by the decoder to the original color profile, one of the JxlDecoderGetColor* functions needs to be called with JXL_COLOR_PROFILE_TARGET_DATA to get the color profile of the decoder output, and then an external CMS can be used for conversion. Note that for lossy compression, this should be set to false for most use cases, and if needed, the image should be converted to the original color profile after decoding, as described above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:full Label to attach to a PR to run the full CI workflow and not just the regular PR workflows

Projects

None yet

3 participants