简体   繁体   中英

Create image from Canvas with AVIF image format

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.com/Kagami/avif.js

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM