Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pp.on("quantizeImage", async ({data, width, height}, cb) => {
workingCount++;
pp.send("workingCount", {id: WORKER_ID, working: workingCount});
const f = new GifWrap.GifFrame({width, height, data: Buffer.from(data, "base64")});
GifWrap.GifUtil.quantizeDekker([f]);
workingCount--;
pp.send("workingCount", {id: WORKER_ID, working: workingCount});
cb({width: f.bitmap.width, height: f.bitmap.height, data: f.bitmap.data.toString("base64")});
});
(async () => {