javascript - Create image from Canvas with AVIF image format - Stack Overflow

AVIF a very promising image formatcodec which based on the sample is far better than JPEG.My question

AVIF a very promising image format/codec which based on the sample is far better than JPEG. My question is how do you create a AVIF image from a Canvas?

So instead of JPEG, something like:

canvas.toBlob(function (blob) {}, "image/avif", 1.0)

Is there a polyfill or something to make it work in the browser (encoding image part)?

Reference: .js

AVIF a very promising image format/codec which based on the sample is far better than JPEG. My question is how do you create a AVIF image from a Canvas?

So instead of JPEG, something like:

canvas.toBlob(function (blob) {}, "image/avif", 1.0)

Is there a polyfill or something to make it work in the browser (encoding image part)?

Reference: https://github./Kagami/avif.js

Share Improve this question asked Apr 14, 2020 at 10:57 quarksquarks 35.4k82 gold badges308 silver badges547 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

Currently no browsers support creation of an AVIF from a canvas, but that should change soon.

  • Chrome can already consume AVIF images, so should be able to generate them from canvas soon.
  • Firefox will add AVIF support in one of the uping Firefox releases. (likely 87 or 88)

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745488241a4629865.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信