private static void walk(File root, MultiMap<Couple<Integer>, String> dimToPath, File file) throws IOException {
    if (file.isDirectory()) {
      for (File child : file.listFiles()) {
        walk(root, dimToPath, child);
      }
    }
    else {
      if (IMAGE_EXTENSIONS.contains(FileUtilRt.getExtension(file.getName()))) {
        String relativePath = file.getAbsolutePath().substring(root.getAbsolutePath().length() + 1);
        Image image = loadImage(file);
        File target;
        int width = image.getWidth(null);
        int height = image.getHeight(null);
        if (height != width && (height > 100 || width > 100)) {
          target = new File("/Users/max/images/other", relativePath);
        }
        else {
          target = new File("/Users/max/images/icons", relativePath);
          dimToPath.putValue(new Couple<>(width, height), relativePath);
        }
        FileUtil.copy(file, target);
      }
    }
  }
private static void walk(File root, MultiMap<Couple<Integer>, String> dimToPath, File file)