// use x for black and _ for white static BWImage bwImageFromString(S s) { LS lines = tlft(s); if (empty(lines)) null; int h = l(lines), w = l(first(lines)); BWImage out = new(w, h); for y to h: { S line = lines.get(y); for x to w: if (charAt(line, x) == '_') out.setInt(x, y, 255); } ret out; }