<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<canvas id="canvas" width="700" height="300"></canvas>
<script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
let img = new Image();
img.src = 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/3/pixel-girl-head.png';
img.onload = function() {
ctx.drawImage(img, 0, 0, 300, 200);
ctx.mozImageSmoothingEnabled = false;
ctx.imageSmoothingQuality = 'high';
ctx.webkitImageSmoothingEnabled = false;
ctx.msImageSmoothingEnabled = false;
ctx.imageSmoothingEnabled = false;
ctx.drawImage(img, 350, 0, 300, 200);
};
</script>
</body>
</html>