canvas.beginDraw();
prettyHints(canvas);
canvas.background(255);
r.render(canvas, 0, 0, canvas.width, canvas.height,true);
canvas.endDraw();
canvas.loadPixels();
PImage img = canvas.get();
canvas.dispose();
img.loadPixels();
img.save(f.getAbsolutePath());
} catch (RuntimeException e)