AVIF with less than 16px cannot be displayed because it contains errors (despite passing the AOM AVIF Validator)
Categories
(Core :: Graphics: ImageLib, defect, P3)
Tracking
()
People
(Reporter: daniel.berndt, Unassigned)
Details
Attachments
(1 file)
|
670 bytes,
image/avif
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0
Steps to reproduce:
Opened the attached image.
Also available here: https://uploads.codecks.io/account-14c3021c-95ad-11e9-b939-5368e19a8f5e/2022/aFWZQxc3eV/bug-firefox.avif
Actual results:
Error message: "The image cannot be displayed because it contains errors"
Expected results:
The image should have been shown (works in chrome, https://gpac.github.io/ComplianceWarden-wasm/avif.html doesn't return any errors either)
Some more context: this image is generated using the sharp@0.30.4 node library. This image is a 14x14 image. If the smallest dimension is at least 16px it works. Feel free to adapt the w and h parameters here to generate more versions:
https://i.codecks.io/w:14,h:14,fit:cover,avif/https%3A%2F%2Fcdn.discordapp.com%2Favatars%2F105685037424381952%2F19de8bf8deab4c94a67920ee0607c6d2.png
Interestingly sharp does choke as well when trying to parse the 14x14 image it generates. Sharp's error message is:
Error: source: bad seek to 678
heifload_buffer: bad image dimensions on decode
| Reporter | ||
Comment 1•3 years ago
|
||
Okay, I've investigated a bit further and updated sharp to version 0.31.2. It now generates 14x14px AVIF files that Firefox can open:
https://uploads.codecks.io/account-14c3021c-95ad-11e9-b939-5368e19a8f5e/2022/Hw75VHIFEa/sharp-0-31.avif
This makes the issue less pressing on my end (I'll update the sharp version on the image processing server above), but it still implies that Firefox has an issue with certain AVIF files that other browsers can open.
Comment 2•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Graphics: ImageLib' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•3 years ago
|
||
Tim, could you please have a look at this when you get some time?
Comment 4•3 years ago
|
||
If you set image.avif.compliance_strictness in about:config to 0 (least strict) then the image shows up okay.
I don't know the specific issue that we are hitting with this image, but the reasoning we had for being somewhat strict (we default to 1, and there is level 2 which is the most strict) with avifs is that it is a new format and we don't want to let too many bugs to creep into new encoders right at the start of the format. If we run into too many avifs that hit this problem we'd have to reconsider, but in this case it seems only an older version of the program is generating the files, so it seems like we are probably okay for now.
Updated•3 years ago
|
Description
•