-
Notifications
You must be signed in to change notification settings - Fork 208
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
CICP information lost when decoding to png/jpeg #1421
Comments
Maryla: Should we open an issue when we save a decoded AVIF image as JPEG? |
H I didn't realize I'd closed it. Reopening it since it was meant to cover both png and jpeg. |
For PNG it is preferable to just use |
@wantehchang The eventual decisions in that PR (in terms of what to write and when) all look correct to me. Thanks! |
According to https://github.com/AOMediaCodec/libavif/wiki/CICP if an avif image does not contain an ICC profile, then the first two values of the CICP triplet, i.e. the color primaries and the transfer characteristics should be used to decide how to interpret the RGB values. However, this information is not stored in the decoded png/jpeg and will cause color differences if the values differ from sRGB.
For png it's possible to use the cHRM, gAMA and/or cICP chunks.
For jpeg I'm not aware of a equivalent mechanism, the solution might be to generate an icc profile.
See an example avif image, and the decoded versions with
avifdec original.avif decoded.png
, at revision c74526fThe text was updated successfully, but these errors were encountered: