static BufferedImage twoColorImage(Color bg, Color fg, IBinaryImage image) { ret image == null ?: bufferedImageFromFunctionWithoutAlpha(image.getWidth(), image.getHeight(), (x, y) -> image.getPixel_noRangeCheck(x, y) ? fg : bg); }