ar inputCanvas = root.select("canvas.input");
  var canvasWidth = inputCanvas.node().getBoundingClientRect().width;
  var canvasHeight = inputCanvas.node().getBoundingClientRect().height;
  inputCanvas.node().width = canvasWidth;
  inputCanvas.node().height = canvasHeight;
  var inputContext = inputCanvas.node().getContext("2d");

  var outputCanvas = root.select("canvas.output");
  outputCanvas.node().width = outputCanvas.node().getBoundingClientRect().width;
  outputCanvas.node().height = outputCanvas.nod