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

0.1.6 • Public • Published

WIP

install

npm install libwebp-wasm

usage

api

decode

    const { width, height, frameList } = await decode(webpFileBytes);
    for (const { data } of frameList) {
      const c = rgbaToCanvas(data, width, height);
      document.body.appendChild(c);
    }

encodeFiles

const { width, height } = await getSize(fileBytesList[0]);
const webpFileBytes = await encodeFiles(fileBytesList, width, height, 60);

encodeRGBA

encodeRGBA(rgba, width, height, 85) 

Readme

Keywords

none

Package Sidebar

Install

npm i libwebp-wasm

Weekly Downloads

2

Version

0.1.6

License

MIT

Unpacked Size

1.35 MB

Total Files

21

Last publish

Collaborators

  • ahaoboy