static L rgbImageToFixedSizeTiles(RGBImage img, int tileW, int tileH) { new L tiles; int w = img.getWidth(), h = img.getHeight(); for (int y = 0; y + tileH <= h; y += tileH) for (int x = 0; x + tileW <= w; x += tileW) tiles.add(rgbClip(img, Rect(x, y, tileW, tileH))); ret tiles; }