From dfee848a397186d98747ee1dfc254b8d9126a7a9 Mon Sep 17 00:00:00 2001 From: Velu S Gautam Date: Wed, 16 Sep 2020 12:12:32 +0530 Subject: [PATCH] Update example.html (#827) rawImage is a Uint8ClampedArray and doesn't have width and height property. --- codecs/imagequant/example.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codecs/imagequant/example.html b/codecs/imagequant/example.html index cae32c8e..c2a90c0c 100644 --- a/codecs/imagequant/example.html +++ b/codecs/imagequant/example.html @@ -29,7 +29,7 @@ const rawImage = Module.zx_quantize(image.data, image.width, image.height, 1.0); console.log('done'); - const imageData = new ImageData(new Uint8ClampedArray(rawImage.buffer), rawImage.width, rawImage.height); + const imageData = new ImageData(new Uint8ClampedArray(rawImage.buffer), image.width, image.height); const canvas = document.createElement('canvas'); canvas.width = image.width; canvas.height = image.height;