public List<String> loadDirectory(File dir) {
		List<String> list = new ArrayList<String>();
		for (File file : dir.listFiles()) {
			if (file.isDirectory()) continue;
			String fname = file.getName();
			if (fname.matches(".*\\.(?:(?:png)|(?:jpg)|(?:bmp)|(?:gif))")) list.add(file.getPath());
		}
		return list;
	}