This commit is contained in:
tamaina 2023-04-12 14:21:05 +00:00
parent 3d5c068aed
commit 92201e7f13

View file

@ -52,7 +52,7 @@ function draw() {
if (props.hash == null) return; if (props.hash == null) return;
const pixels = decode(props.hash, width, height); const pixels = decode(props.hash, width, height);
const ctx = canvas.getContext('2d'); const ctx = canvas.getContext('2d');
const imageData = ctx!.createImageData(props.width, props.height); const imageData = ctx!.createImageData(width, height);
imageData.data.set(pixels); imageData.data.set(pixels);
ctx!.putImageData(imageData, 0, 0); ctx!.putImageData(imageData, 0, 0);
} }