You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I draw the gif with canvas fixed size but the image get blur. For example, I want the gif to be drawn at 300x300, I follow this code:
const gif = parseGIF(arrayBuffer);
const frames = decompressFrames(gif, true);
const frame = frames[0];
var dims = frame.dims;
const frameImageData = tempCtx.createImageData(dims.width, dims.height);
// set the patch data as an override
frameImageData.data.set(frame.patch);
// draw the patch back over the canvas
tempCtx.putImageData(frameImageData, 0, 0);
ctx.drawImage(tempCanvas, dims.left, dims.top, 300, 300);
the image is blurry and I'm not sure what I'm missing here, thanks
The text was updated successfully, but these errors were encountered:
dim0147
changed the title
Draw gif on canvas with fixed size
Draw gif on canvas with fixed size get blurry
Sep 7, 2022
Hi, I draw the gif with canvas fixed size but the image get blur. For example, I want the gif to be drawn at 300x300, I follow this code:
the image is blurry and I'm not sure what I'm missing here, thanks
The text was updated successfully, but these errors were encountered: