To place the retina size image into an HTML5 canvas, try the following code with canvas:
var context = myCanvas.getContext("2d");
context.attr("width", width * window.devicePixelRatio);
context.attr("height", height * window.devicePixelRatio);
context.scale(window.devicePixelRatio, window.devicePixelRatio);
context.drawImage(img, x, y, width, height);