FileUtils.copyFile(new File(srcFile), destFile);
} else {
fileOperator.downloadFile(remoteFileKey, localFile);
}
// 压缩该目标图片
LocalImageResizeTask task = new LocalImageResizeTask(localFile, baseSizes);
task.setAlbumId(albumId);
task.setUserId(ownerId);
task.setSupportMulitFrame(false);
ImageResizeResult resizeResult = imagine.processSingleImage(localStorePath, task);
Photo portrait = albumService
.createPortraitPhoto(user, portraitAlbum, resizeResult);
remoteFileKey = portrait.getSmallFile() + '.' + portrait.getExt();
} else {