function resizeWithCanvas(canvas, source, destWidth, destHeight, sourceX,
  sourceY, sourceWidth, sourceHeight)
{
  var canvas = document.createElement("canvas")

  canvas.width  = destWidth
  canvas.height = destHeight

  var ctx = canvas.getContext("2d")
  ctx.drawImage(source,
    sourceX, sourceY, sourceWidth, sourceHeight,
    0, 0, destWidth, destHeight)

  return canvas
}

@@ -250,16 +250,225 @@
 t(%222d%22)%0A
+%0A  ctx.mozImageSmoothingEnabled    = true%0A  ctx.imageSmoothingQuality       = %22high%22%0A  ctx.webkitImageSmoothingEnabled = true%0A  ctx.msImageSmoothingEnabled     = true%0A  ctx.imageSmoothingEnabled       = true%0A%0A
   ctx.dr

Add imageSmoothingEnabled support