A canvas shadow drawImage example

function canvasReady() {
  draw(document.getElementById('canvas').getContext('2d'));
}
function draw(ctx) {
  ctx.shadowBlur = 10;
  ctx.shadowOffsetX = 10;
  ctx.shadowOffsetY = 10;
  ctx.shadowColor = "gray";

  ctx.drawImage(document.getElementById('source'),33,71,104,124,21,20,87,104);
  ctx.drawImage(document.getElementById('frame'),0,0);

  ctx.drawImage(document.getElementById('source'),33,71,104,124,21,220,87,104);
}
    

Source images