-
Notifications
You must be signed in to change notification settings - Fork 31
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
avif can't keep icc profile and other metadata #15
Comments
I'm planning to apply color profiles in order to convert pixel data to one of color spaces already supported by AVIF. OTOH embedding ICC in AVIF would be an anachronism and a waste of space. To me profiles are only a workaround for crappy old 8-bit formats that can't represent wider gamut otherwise. AV1 supports Rec. 2020, HDR, and high bit depths natively, so ICC profiles are just a waste of space, processing and needless loss of precision. |
Thank you for your reply kornelski :) And a little curious, av1 rav1e encoder probably can use ycocg(--nclx 1/13/0)? |
I haven't finished implementing ycocg, and once I've realized it needs 9 bits to be lossless I'm not in a rush. 10 or 12 bits in another color space could be precise enough? It's still a lossy compression anyway. As for conversion to png, an AVIF decoder should generate a new ICC profile if necessary, based on what color space AVIF used. If AVIF can store 10 or 12 bit Rec 2020, that should be more than enough for any profile. Then you can decode to 16bit png with Rec 2020 ICC or something smaller if you have a smart converter. For 8 bit png I would not bother with anything larger than sRGB, regardless of ICC support. |
Well, as long as 8-bit raster formats and devices are the dominant species on the web and in consumer's hands using and presuming sRGB only is the worst possible solution to the problem - no matter what you think about it and the world won't change just because of your personal opinion. Most people don't have time (or knowledge) to fiddle with images: they want their "good looking 8-bit consumer JPEGs" to become good looking AVIFs - just with less data, because they were told it's nice to use less data for virtually the same image quality. They understand that. If the image you tool creates looks like shit to many people, they won't use or recommend your tool and promoting AVIF will become harder, because for Jane and Joe Average "AVIF images always look like shit". You might be blessed with a perfectly calibrated HDR wide gamut screen, but mere mortals unfortunately have crappy 8-bit screens on their desks and in their hands and those that produce content for these people need a working and practical solution. Even high-end RAW footage is "flawed" and editing such footage always requires the colour profile of the camera that took the footage (image or video) to allow any target device to display as much of the image data as possible (colours and dynamic range). Same issue. There's also no need to "waste data" by embedding the whole profile anyway. If it's a well known and common profile available for virtually all devices and any image and video processing software, the maximum about of bytes wasted are those for the ICC tag. Thanks for the software, anyway. Have a good time. 👋🏻 |
Your rant is not appropriate here, both for its tone, and for beating a technically-inaccurate strawman.
|
Hey @kornelski --
|
@zachlewis As far as I know, Rec. 709 has the same primaries and white point as sRGB, only the gamma differs. But when encoding to 10-bit depth there should be enough precision left to convert from ~2.2 to 2.4. To support this I'd just need to accept higher-depth inputs. There also is a constant for Rec. 709 gamma in AV1 metadata, so even that doesn't need ICC. |
Hello, kornelski
cavif-rs is work very well, file size and quality is amazing :),
but compressed avif can't keep icc profile and other metadata,
probably can add a flag to handle icc profile and other metadata?
The text was updated successfully, but these errors were encountered: