static Image2B image2BFromFunction(int w, int h default w, IIntIntPred f) { Image2B img = new(w, h); for y to h: for x to w: img.setPixel(x, y, f.get(x, y)); ret img; }