static RGBImage greenWhiteMarkedImage(RGBImage image, bool[] mark) { int w = image.getWidth(), h = image.getHeight(); RGBImage i = new RGBImage(w, h); for y to h: for x to w: i.setPixel(x, y, get(mark, y*w+x) ? greenWhiteMarkedImage_color(x, y) : image.getInt(x, y)); ret i; } static int greenWhiteMarkedImage_color(int x, int y) { ret odd(x+y) ? 0xFFFFFF : 0x00FF00; }