mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 17:49:52 +00:00
15 lines
362 B
JavaScript
15 lines
362 B
JavaScript
const oxipng = require("./oxipng_wasm");
|
|
const repl = require("repl");
|
|
const fs = require("fs");
|
|
|
|
async function init() {
|
|
// const img = fs.readFileSync("img.png")
|
|
// const output = oxipng.compress(img, 0);
|
|
// fs.writeFileSync("output.png", output);
|
|
console.log(">>>", oxipng.doit());
|
|
const r = repl.start("node> ");
|
|
r.context.i = oxipng;
|
|
}
|
|
|
|
init();
|