Property:
drawImage:
img,10,10,50,277
img,10,10,100,277
img,10,10,200,277
img,10,10,220,277
img,10,10,250,277
img,10,10,300,277
img,10,10,400,277
Canvas:
your browser does not support the canvas tag
Code:
var img=document.createElement('img');
img.src='img_the_scream.jpg';
img.onload = function () {
var c=document.getElementById('myCanvas');
var ctx=c.getContext('2d');
ctx.drawImage(
img,10,10,220,277)
;
}
Click the property values above to see the result
W3Schools.com
- Play it