Open derekm opened 4 years ago
Hi, I just tried it. The file decodes nicely with heif-convert
. I tried the current version from the master branch and v1.7.0. Both worked fine.
Which version and what command did you use?
I tried to open it here: https://strukturag.github.io/libheif/
Yes, the JS version is currently limited to HEIF files only. For AVIF, we would have to compile the aom library to JS too. The other webpage you're referring to uses dav1d as decoding library, that might be another option if aom is too slow in JS.
Not sure if the JS decoder is needed, though, as the next Chrome (85) is going to support AVIF natively and the other browsers might follow soon. Firefox beta also has experimental support (77).
Ah ok! Broader adoption is good news! I noticed my mobile devices recently started being able to play AV1 films I've uploaded to Bitcoin! ;)
If this issue is out-of-scope, feel free to close it. Thanks!
When I try it with the current version of libheif from the master branch and with the default libaom 1.0.0 from my Ubuntu distribution, all AVIF images including this one decode to a green mess, suggesting there is something wrong with the color channels or conversion.
Another alternative to convert AVIF files both in the browser and node:
I have a sample AVIF file of page 1 of the U.S. Constitution stored on the Bitcoin blockchain here:
https://bico.media/4c97b18d3f157b593045fe1525f5fdc608bc207e4729964855604ad40dc77e0f
The file is viewable with avif.js:
https://kagami.github.io/avif.js/?src=https://bico.media/4c97b18d3f157b593045fe1525f5fdc608bc207e4729964855604ad40dc77e0f
It would be nice if libheif could also render the same file.
PS: A query param to accept a file location for your web-based image viewer would also be a cool addition.