Fix TypeScript complaint in Blurhash component

This commit is contained in:
Volpeon
2025-08-02 18:19:15 +02:00
committed by nicole mikołajczyk
parent 1755fddd49
commit 72c5be1bce

View File

@ -42,7 +42,7 @@ const Blurhash: React.FC<IBlurhash> = React.memo(({
try {
const pixels = decode(hash, width, height);
const ctx = canvas.getContext('2d');
const imageData = new ImageData(pixels, width, height);
const imageData = new ImageData(new Uint8ClampedArray(pixels), width, height);
if (!ctx) return;
ctx.putImageData(imageData, 0, 0);