ifclass RGBImage static BWImage toBWImage(RGBImage img) { ret toBW(img); } endif static BWImage toBWImage(BufferedImage img) { ret img == null ?: new BWImage(img); } static BWImage toBWImage(MakesBufferedImage img) { if (img == null) null; if (img cast BWImage) ret img; ret new BWImage(toBufferedImage(img)); }