Localize variables in imagequant

This commit is contained in:
Ingvar Stepanyan
2020-05-14 16:37:50 +01:00
committed by Ingvar Stepanyan
parent 4fc18de5f9
commit c39383333f
5 changed files with 45 additions and 48 deletions

View File

@@ -17,7 +17,7 @@ export async function process(data: ImageData, opts: QuantizeOptions): Promise<I
const imgData = new ImageData(new Uint8ClampedArray(result.buffer), result.width, result.height);
module.free_result();
module.free_result(imgData.data.byteOffset);
return imgData;
}