String smallFile = portrait.getSmallFile();
String ext = portrait.getExt();
String remoteFileKey = smallFile + '.' + ext;
SkylineImageCropTask cropTask = new SkylineImageCropTask(remoteFileKey, portraitSize);
cropTask.setAlbumId(albumId);
cropTask.setUserId(ownerId);
cropTask.setOffsetX(x);
cropTask.setOffsetY(y);
cropTask.setCropSize(size);
ImageCropResult cropResult;
try {
cropResult = crop.processImage(basePath, cropTask);
} catch (IOException e) {
throw new OperateFailedException("无法剪切图片");