static LPair scaleDownTestImagesWithRect(int gridSize, LPair data) { LPair scaledImages = new L; for (Pair p : data) { BufferedImage img = loadImage2(p.a); RGBImage rgb = RGBImage(scaleImageWithFactor(1.0/gridSize, img)); add(scaledImages, pair(rgb, scaleRect(p.b, 1.0/gridSize))); } ret scaledImages; }