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

process all data in linear RGB internally, add display transform #1

Open
kfjahnke opened this issue Jul 20, 2024 · 0 comments
Open

Comments

@kfjahnke
Copy link
Owner

Currently, envutil will process data as delivered by OIIO, without conversion to linear RGB if that is the native data format in the image file. This is not mathematically correct unless the data is in linear RGB already, and to be completely correct, the data should be scene-linear, and display-linear data would need to be converted back to scene-linear to do the math correctly.

The conversion of display-linear data or data in an output color space (like sRGB) may not be technically possible (if a 3D LUT was used, the conversion may not be unambiguously reversible, filters may be baked into the data) - but for the sake of processing, approaching scene-linear via a simple tone curve for all channels should produce better results, even if the correct reconstruction of the scene-linear data is not possible.

I think that the color space conversions could be done with OIIO or OCIO, but so far I don't have any code in place. Keep possibility of using EMoR in mind.

I need:

  • inspection of the input file: what is it's color space
  • if it's in an output color space, convert to display-linear
  • invert the display transform
  • on output, if the format requires, convert accordingly

If a 3D LUT was used, inverting it may be possible under constraints, investigate.

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