Moved Ditherer to other folder
This commit is contained in:
parent
98efaa42fd
commit
4b097a0d15
@ -2,8 +2,11 @@ class Ditherer {
|
|||||||
async dither(image: Uint8ClampedArray): Promise<Uint8ClampedArray> {
|
async dither(image: Uint8ClampedArray): Promise<Uint8ClampedArray> {
|
||||||
const worker: any = await wasmWorker("/main.wasm");
|
const worker: any = await wasmWorker("/main.wasm");
|
||||||
let output: Uint8ClampedArray;
|
let output: Uint8ClampedArray;
|
||||||
output = await worker.dither(image);
|
try {
|
||||||
worker.terminate();
|
output = await worker.dither(image);
|
||||||
|
} finally {
|
||||||
|
worker.terminate();
|
||||||
|
}
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user