diff --git a/mod.ts b/mod.ts index fca2314..50663a9 100644 --- a/mod.ts +++ b/mod.ts @@ -1,4 +1,8 @@ -import init, { encode as wasmEncode, decode as wasmDecode, source } from "./wasm.js"; +import init, { + decode as wasmDecode, + encode as wasmEncode, + source, +} from "./wasm.js"; await init(source); @@ -37,13 +41,13 @@ export const FilterType = { }; export interface DecodeResult { - image: Uint8Array, - width: number, - height: number, - colorType: ValueOf, - bitDepth: ValueOf, - lineSize: number -} + image: Uint8Array; + width: number; + height: number; + colorType: ValueOf; + bitDepth: ValueOf; + lineSize: number; +} export function encode( image: Uint8Array, @@ -73,7 +77,7 @@ export function encode( export function decode(image: Uint8Array): DecodeResult { const res = wasmDecode(image); - + return { image: new Uint8Array(res.image), width: res.width,