Package com.common.util

Examples of com.common.util.ImgUtils


    String outPutDir="d:\\del\\yasuo\\";
    String photo= FileUpload.uploadFile(photof, uploadDir, photofFileName);
    String outPutFileName=photo.substring(0,36)+"_min.jpg";
    String uploadFileDir=uploadDir+photo;
    String outPutFileDir=outPutDir+outPutFileName;
    ImgUtils imgUtils=new ImgUtils();
    Long imgBig_Size= imgUtils.getPicSize(uploadFileDir)/1024;
    System.out.println("上传后源文件大小:"+imgBig_Size+"KB");
    imgUtils.compressPic(uploadDir,outPutDir , photo, outPutFileName,500,1000,true);
    System.out.println("压缩后的文件大小:"+imgUtils.getPicSize(outPutFileDir)/1024+"KB");
    int end = (int) System.currentTimeMillis(); // 结束时间
    int re = end-start; // 但图片生成处理时间
    System.out.println("共用时:"+re+"毫秒");
    return "save";
  }
View Full Code Here

TOP

Related Classes of com.common.util.ImgUtils

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.