!752 static RGBImage board; static int boardW, boardH; p { BufferedImage screen = loadBufferedImage("#1006074"); Rect boardRect = pointRect(194, 179, 501, 485); board = new RGBImage(screen).clip(boardRect); boardW = board.w(); boardH = board.h(); //showImage(board); //showImage(square(0, 0)); //showImage(square(7, 7)); new L imgs; for y to 8: { new L l; for x to 8: l.add(square(x, y)); imgs.add(mergeImagePartsHorizontally(board, l)); } showImage(mergeImagesVertically(imgs)); } static Rect square(int x, int y) { ret pointsRect( boardW*x/8, boardH*y/8, boardW*(x+1)/8, boardH*(y+1)/8); }