1.0.0 • Published 2 years ago
libheif-wasm v1.0.0
declare const decode: (data: Uint8Array, option?: Partial<{
needAlpha: boolean;
}>) => Promise<{
data: Uint8Array;
width: number;
height: number;
channel: number;
}>;
declare const encode: () => never;
export { decode, encode };
import fs from "fs";
import { decode } from "../src";
const main = async () => {
const buf = fs.readFileSync("./heifs/compare_still_3.heic");
const { width, height, channel, data } = await decode(buf);
console.log(width, height, channel, width * height * channel, data.length);
};
main();
1.0.0
2 years ago