String suffix = pdfImage.getSuffix();
String name = getUniqueFileName(prefix + "_" + key, suffix);
if (!"jpg".equals(suffix) && !"png".equals(suffix)) {
System.err.println("Image format: " + suffix);
}
pdfImage.write2file(basePath.getAbsolutePath() + File.separator + name);
String path = name + "." + suffix;
if (lazyImages) {
imageCache.put(key, path);
}