O'Reilly logo
  • Scott Noyes thinks this is interesting:

ctx.drawImage(img, x, y, width * scale, height * scale);

From

Cover of HTML5 Games: Novice to Ninja

Note

Should be:
ctx.drawImage(img, x, y, img.width * scale, img.height * scale);