Package net.baguajie.vo

Examples of net.baguajie.vo.ImageReadyVo


    file = res.getFile();
    if(file != null && ext == null){
      ext = FilenameUtils.getExtension(file.getName());
    }
    img = ImageIO.read(file);
    ImageReadyVo ir = new ImageReadyVo();
    ir.setFile(file);
    ir.setExt(ext);
    ir.setOrgSize(new Integer[] { img.getHeight(), img.getWidth() });
    return ir;
  }
View Full Code Here


    }
    // save spot
    Spot spot = Spot.from(vo, signInUser);
    try {
      // get image
      ImageReadyVo ir = webImageUtil
          .prepareImageFromUrl(vo.getImageUrl());
      String resId = imageService.put(ir.getFile());
      Resource res = new Resource();
      res.setOrgSize(ir.getOrgSize());
      res.setResId(resId);
      res.setExt(ir.getExt());
      resourceRepository.save(res);
      spot.setImage(res);
    } catch (Exception e) {
      throw new RuntimeException(e.getMessage(), e);
    }
View Full Code Here

TOP

Related Classes of net.baguajie.vo.ImageReadyVo

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.