// 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); print ifdef bwImageFromString(+line); for x to w: if (charAt(line, x) != 'x') out.setInt(x, y, 255); } ret out; }