M
M
Maxim Vakaev2022-02-03 10:19:47
JavaScript
Maxim Vakaev, 2022-02-03 10:19:47

How to display an image on canvas svg so that it is not blurry?

Good day, the essence of the problem is that I need to display the svg image on the canvas, but when it is displayed through drawImage, it is drawn blurry, how to fix this, are there any methods to display the svg on the canvas more or less clearly? Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2022-02-03
@Aleksandr-JS-Developer

Yes, make the svg big. If svg is 20x20px, then when applied to canvas, it can be blurry.

L
londhor, 2022-02-03
@londhor

Most likely the problem is in coordinates or size. Look up the values ​​in PX, and round them to round values, no half pixels

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question