How to draw Image in HTML Canvas?

We can draw images inside canvas  by using the  drawImage('someImage' , x, y)  method. It takes image source stored in a variable as input along with co-ordinates for painting the image.

HTML

 

JS

 

OUTPUT

Leave a Reply