ctx.drawImage(img, 0, 0, img.width, img.height, // source rectangle 0, 0, canvas.width, canvas.height); // destination rectangle