static Image2B toImage2B(BufferedImage img) { ret img == null ? : new Image2B(img); } static Image2B toImage2B(MakesBufferedImage img) { if (img == null) null; if (img cast Image2B) ret img; if (img cast BWImage) ret Image2B(img); if (img cast IBinaryImage) ret iBinaryImageToImage2B(img); ret new Image2B(toBufferedImage(img)); }