// undefined color, seems to be all black in practice static BufferedImage newGrayBufferedImage(int w, int h) { ret new BufferedImage(w, h, BufferedImage.TYPE_BYTE_GRAY); } static BufferedImage newGrayBufferedImage(int w, int h, byte[] pixels) { ret byteArrayToGrayBufferedImage(pixels, w, h); }