avif-wasm
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

fork from avif.io and libavif

install

npm i avif-wasm 

usage

import { init, encode, ConversionOptions, Subsampling } from 'avif-wasm'
const wasmModule = await init();
const buffer = readFileSync('test.png');
const options = new ConversionOptions(80, 80, Subsampling.YUV444, false)
const data = await encode(buffer, options, (p: number) => {
    console.log('progress', p)
})
const file = new File(
    [data],
    `avif.avif`
)
download(file);

Readme

Keywords

none

Package Sidebar

Install

npm i avif-wasm

Weekly Downloads

0

Version

0.1.5

License

MIT

Unpacked Size

14 MB

Total Files

18

Last publish

Collaborators

  • ahaoboy