Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out how to handle BT.709-tagged images #409

Open
tirr-c opened this issue Jan 18, 2025 · 0 comments
Open

Figure out how to handle BT.709-tagged images #409

tirr-c opened this issue Jan 18, 2025 · 0 comments

Comments

@tirr-c
Copy link
Owner

tirr-c commented Jan 18, 2025

libjxl linearizes BT.709-tagged images without ICC profile using BT.709 inverse OETF, whereas BT.709 recommends using BT.1886 EOTF when linearizing to display light. This leads to some inconsistencies:

  • Say that we have an original image which is encoded in BT.709. Let's call this encoded signal A.
  • Recommended way to linearize to display light is to use BT.1886 EOTF (which is pure gamma 2.4). Let's call this signal X.
  • libjxl linearizes and encodes A using BT.709 inverse OETF (which is supposed to work on scene light). Let's call this signal Y.
  • Inconsistencies happen when the encoded image is decoded back to PNG:
    • Most image viewers will display the original image as X.
    • Image viewers which prefers CICP tag will display the encoded image as X.
    • Image viewers which prefers ICC profile will display the encoded image as Y.
    • When the encoded image is decoded in sRGB color space, it will almost always be displayed as Y (or something similar), because it's what the image is actually encoded as.

Related to #318

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant