Answer the question
In order to leave comments, you need to log in
How to round the corners of an image on canvas?
Are there built-in methods for rounding the edges of an image in JS (similar to border-radius in css) when displaying an image on a canvas? What ready implementations of similar you met?
Answer the question
In order to leave comments, you need to log in
Here I wrote a function for rounding pictures, similar to drawImage. Only the first parameter is context , and the last is the round radius. Here an example .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question