Package net.imagine.provider.skyline

Examples of net.imagine.provider.skyline.ImageCropResult


    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("无法剪切图片");
    }
    if (cropResult == null || cropResult.getResultState() != ResultState.SUCCESS) {
      throw new OperateFailedException("无法剪切图片,原因:"
          + (cropResult == null ? null : cropResult.getResultState()));
    }
    String portraitFile = cropResult.getFileKey();

    personalInfoService.changeUserPortrait(ownerId, portraitFile);
    user.setPortrait(portraitFile);
    WebHelper.setSessionAttribute(null, Constant.SESSION_USER, user);
View Full Code Here


      String remoteFileKey = smallFile + '.' + ext;

      SkylineImageCropTask cropTask = new SkylineImageCropTask(remoteFileKey, portraitSize);
      cropTask.setAlbumId(albumId);
      cropTask.setUserId(userId);
      ImageCropResult cropResult = crop.processImage(basePath, cropTask);
      String portraitFile = cropResult.getFileKey();

      personalInfoService.changeUserPortrait(userId, portraitFile);
      user.setPortrait(portraitFile);
      WebHelper.setSessionAttribute(request, Constant.SESSION_USER, user);
View Full Code Here

      String remoteFileKey = smallFile + '.' + ext;

      SkylineImageCropTask cropTask = new SkylineImageCropTask(remoteFileKey, portraitSize);
      cropTask.setAlbumId(albumId);
      cropTask.setUserId(spotId);
      ImageCropResult cropResult = crop.processImage(basePath, cropTask);
      String portraitFile = cropResult.getFileKey();
      spotService.updateSpotPortrait(spotId, portraitFile);
     
      spot.setPortrait(portraitFile);
      //WebHelper.setSessionAttribute(request, Constant.SESSION_USER, user);
View Full Code Here

      }

      SkylineImageCropTask cropTask = new SkylineImageCropTask(remoteFileKey, portraitSize);
      cropTask.setAlbumId(albumId);
      cropTask.setUserId(ownerId);
      ImageCropResult cropResult = crop.processImage(localStorePath, cropTask);
      String portraitFile = cropResult.getFileKey();

      personalInfoService.changeUserPortrait(ownerId, portraitFile);
      user.setPortrait(portraitFile);
      WebHelper.setSessionAttribute(null, Constant.SESSION_USER, user);
View Full Code Here

    cropTask.setAlbumId(albumId);
    cropTask.setUserId(spotId);
    cropTask.setOffsetX(x);
    cropTask.setOffsetY(y);
    cropTask.setCropSize(size);
    ImageCropResult cropResult;
    try {
      cropResult = crop.processImage(basePath, cropTask);
    } catch (IOException e) {
      throw new OperateFailedException("无法剪切图片");
    }
    if (cropResult == null || cropResult.getResultState() != ResultState.SUCCESS) {
      throw new OperateFailedException("无法剪切图片,原因:"
          + (cropResult == null ? null : cropResult.getResultState()));
    }
    String portraitFile = cropResult.getFileKey();

    spotService.updateSpotPortrait(spotId, portraitFile);
    // personalInfoService.changeUserPortrait(ownerId, portraitFile);
    // spot.setPortrait(portraitFile);
    WebHelper.setSessionAttribute(null, Constant.SESSION_USER, user);
View Full Code Here

TOP

Related Classes of net.imagine.provider.skyline.ImageCropResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.