mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 17:49:52 +00:00
Remove obsolete worker termination
I switched build process to proper ES modules back in #672, so, if the TODO is correct, this is no longer necessary.
This commit is contained in:
@@ -109,11 +109,6 @@ async function preprocessImage(
|
|||||||
} else if (isHqx(preprocessData.resize)) {
|
} else if (isHqx(preprocessData.resize)) {
|
||||||
// Hqx can only do x2, x3 or x4.
|
// Hqx can only do x2, x3 or x4.
|
||||||
result = await processor.workerResize(result, preprocessData.resize);
|
result = await processor.workerResize(result, preprocessData.resize);
|
||||||
// Seems like the globals from Rust from hqx and resize are conflicting.
|
|
||||||
// For now we can fix that by terminating the worker.
|
|
||||||
// TODO: Use wasm-bindgen’s new --web target to create a proper ES6 module
|
|
||||||
// and remove this.
|
|
||||||
processor.terminateWorker();
|
|
||||||
// If the target size is not a clean x2, x3 or x4, use Catmull-Rom
|
// If the target size is not a clean x2, x3 or x4, use Catmull-Rom
|
||||||
// for the remaining scaling.
|
// for the remaining scaling.
|
||||||
const pixelOpts = { ...preprocessData.resize, method: 'catrom' };
|
const pixelOpts = { ...preprocessData.resize, method: 'catrom' };
|
||||||
|
|||||||
Reference in New Issue
Block a user