static BufferedImage averageBrightnessImage(BufferedImage img) { ret newBufferedImage(1, 1, blendColor(Color.black, Color.white, new BWImage(img).averageBrightness())); }