static BufferedImage newBufferedImage(int w, int h, Color color) { bufferedImage img = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); Graphics2D g = img.createGraphics(); g.setColor(color); g.fillRect(0, 0, w, h); ret img; }