public static BufferedImage makeThumbnail(BufferedImage original, String path) {
BufferedImage image = getResizedImage(original, Constants.THUMBNAIL_SIZE_FULL);
TFile imageFile = new TFile(path);
try {
TFileOutputStream outputStream = null;
try {
//log.debug("thumbnail path:"+path);
outputStream = new TFileOutputStream(imageFile);
ImageIO.write(image, "jpg", outputStream);
} finally {
if (outputStream != null) {
outputStream.close();
}
}
} catch (IOException e) {
log.error(e,e);
}