How do I remove the blurryness in the html canvas when I upscale an image in drawImage()? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do I remove the blurryness in the html canvas when I upscale an image in drawImage()?

For example I have an image that is 32x32, And the canvas is 640x640, And without realizing the canvas ctx.drawImage(img, 0, 0, canvas.width, canvas.height)

1st Sep 2023, 1:19 PM
Yeeter
Yeeter - avatar
2 Answers
+ 4
See SetSize function at the bottom of the code. https://code.sololearn.com/WM3V3BJNNVC5/?ref=app
2nd Sep 2023, 5:38 AM
Haris
Haris - avatar
1st Sep 2023, 2:42 PM
JaScript
JaScript - avatar