-
Notifications
You must be signed in to change notification settings - Fork 143
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
Support CICP #383
Comments
Given the dominant prior art (or posterior art?) of other formats choosing that triple for color space representations, yes, certainly. Should be simple to add? Similar to |
I think there is one major conceptual question for me: What to do with color-matrix values other than RGB ( I guess, at least at image-rs level it's required to transform to RGB to fit into the current DynamicImage logic? So it would have to apply the specified matrix transform. However, would we change the CICP field in this case? Theoretically, those questions already apply for AVIF already, but since it's currently limited to 8bit in images-rs anyways, it does not seem to be practically relevant. On the other hand, GTK will happily apply the color-matrix values on the raw data and might even pass the original texture through if it's the right format for the compositor/monitor. So there might be arguments for having the raw option available. However, I think it is not that's not that performance relevant for still images. |
I wouldn't worry about the transformation into rgb in In the midterm we're also moving |
And to answer that concretely: I'd return it in an enum and maybe add methods to resolve those enum variants into XYZ primaries. Or not if there's any open questions, it can also be done at a later point. |
IIRC at the moment the spec says that matrix coefficients should be 0. I believe (unless something changed in the meantime) that Chrome will refuse to interpret anything else. Implementation of cicp in the JXL PNG en/decoder: https://github.com/libjxl/libjxl/blob/main/lib/extras/enc/apng.cc#L161 https://github.com/libjxl/libjxl/blob/main/lib/extras/dec/apng.cc#L89 |
I think that this just got implemented: #529 |
Would it be possible to add CICP support while this feature is 'only' part of the Working Draft?
https://www.w3.org/TR/png-3/#cICP-chunk
The text was updated successfully, but these errors were encountered: