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