static BufferedImage imageWithMarkedBoxes(BufferedImage image, Cl boxes, Color color) { image = cloneBufferedImage(image); Graphics2D g = image.createGraphics(); g.setColor(color); for (r : boxes) drawRect(g, r.x-1, r.y-1, r.w+2, r.h+2); ret image; }