// uses # for black and _ for white sS bwImageToString(BWImage img) { if (img == null) null; int w = img.getWidth(), h = img.getHeight(); ret lines(countIterator(h, y -> join(countIterator(w, x -> img.getInt(x, y) >= 128 ? '_' : '#')))); }