util for WebP in JavaScript / WebAssembly
- Source: https://github.com/webmproject/libwebp
- Version: v1.0.2
- License: BSD
import { WebP } from "https://code4fukui.github.io/WebP/WebP.js";
const webpbin = await Deno.readFile('./example.webp');
const image = WebP.decode(webpbin);
console.log(image);
const webpbin2 = WebP.encode(image);
console.log(webpbin2.length);- https://code4fukui.github.io/WebP/dec/example.html
- https://code4fukui.github.io/WebP/enc/example.html
with bin2js
deno run -A https://code4fukui.github.io/bin2js/bin2js.js dec/webp_dec.wasm
deno run -A https://code4fukui.github.io/bin2js/bin2js.js enc/webp_enc.wasm