static int ocr_slimFullSearchMap_maxPixels = 1000; static Map ocr_slimFullSearchMap(Map map) { if (ocr_slimFullSearchMap_maxPixels <= 0) ret map; for (BWImage img : cloneKeys(map)) { int pix = bwImagePixels(img); continue if pix <= ocr_slimFullSearchMap_maxPixels; BWImage img2 = new BWImage(scaleBufferedImageToMaxPixels(ocr_slimFullSearchMap_maxPixels, img.getBufferedImage())); //print("Shrunk image to " + img2.getWidth() + "*" + img2.getHeight()); S md5 = map.get(img); map.remove(img); map.put(img2, md5); } ret map; }