Package net.imagine.core

Examples of net.imagine.core.ResultState


  private List<ImageResizeResult> processResizeResult(
      List<ImageResizeResult> results, StringBuilder message) {
    List<ImageResizeResult> filesInfo = new ArrayList<ImageResizeResult>();
    for (int i = 0; i < results.size(); i++) {
      ImageResizeResult result = results.get(i);
      ResultState state = result.getResultState();
      switch (state) {
      case SUCCESS:
        filesInfo.add(result);
        break;
      case NOT_IMAGE:
View Full Code Here


      outputJsonResult(out, jsonMap);
      return;
    }
    File localFile = generateLocalFile(userId, albumId, file.getOriginalFilename());
    // 保存文件
    ResultState result = storeFileInLocal(localFile, file);
    // 输出结果
    Map<String, Object> jsonMap = resultToJsonMap(result, localFile.getAbsolutePath());
    OutputStream out = response.getOutputStream();
    outputJsonResult(out, jsonMap);
  }
View Full Code Here

          null, false);
      resizeTask.setAlbumId(albumId);
      resizeTask.setUserId(userId);
      resizeTask.setSupportMulitFrame(false);
      ImageResizeResult processResult = imagine.processSingleImage(basePath, resizeTask);
      ResultState resultState = processResult.getResultState();
      if (resultState != ResultState.SUCCESS) {
        jsonMap = resultToJsonMap(resultState, null);
        OutputStream out = response.getOutputStream();
        outputJsonResult(out, jsonMap);
        return;
View Full Code Here

          null, false);
      resizeTask.setAlbumId(albumId);
      resizeTask.setUserId(spotId);
      resizeTask.setSupportMulitFrame(false);
      ImageResizeResult processResult = imagine.processSingleImage(basePath, resizeTask);
      ResultState resultState = processResult.getResultState();
      if (resultState != ResultState.SUCCESS) {
        jsonMap = resultToJsonMap(resultState, null);
        OutputStream out = response.getOutputStream();
        outputJsonResult(out, jsonMap);
        return;
View Full Code Here

  private List<ImageResizeResult> processResizeResult(List<ImageResizeResult> results,
      StringBuilder message) {
    List<ImageResizeResult> filesInfo = new ArrayList<ImageResizeResult>();
    for (int i = 0; i < results.size(); i++) {
      ImageResizeResult result = results.get(i);
      ResultState state = result.getResultState();
      switch (state) {
      case SUCCESS:
        filesInfo.add(result);
        break;
      case NOT_IMAGE:
View Full Code Here

  private List<ImageResizeResult> processResizeResult(List<ImageResizeResult> results,
      StringBuilder message) {
    List<ImageResizeResult> filesInfo = new ArrayList<ImageResizeResult>(results.size());
    for (ImageResizeResult result : results) {
      ResultState state = result.getResultState();
      switch (state) {
      case SUCCESS:
        filesInfo.add(result);
        break;
      case NOT_IMAGE:
View Full Code Here

TOP

Related Classes of net.imagine.core.ResultState

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.