Examples of ThumpnailRescaleOp


Examples of com.mortennobel.imagescaling.ThumpnailRescaleOp

      // 获得原始图片的宽度及高度
      int width = originalImage.getWidth();
      int height = originalImage.getHeight();
      // 判断是否有必要缩放
      if (width > 0 || height > 0) {
        AdvancedResizeOp resizeOp = new ThumpnailRescaleOp (newWidth, newHeight);
        resizeOp.setUnsharpenMask(AdvancedResizeOp.UnsharpenMask.Normal);
        BufferedImage thumbnailImage = resizeOp.filter(originalImage, null);
        ImageIO.write(thumbnailImage, format, thumbnailStream);
      }
    } catch (IOException e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of com.mortennobel.imagescaling.ThumpnailRescaleOp

            // 获得原始图片的宽度及高度
            int width = originalImage.getWidth();
            int height = originalImage.getHeight();
            // 判断是否有必要缩放
            if (width > 0 || height > 0) {
                AdvancedResizeOp resizeOp = new ThumpnailRescaleOp(newWidth, newHeight);
                resizeOp.setUnsharpenMask(AdvancedResizeOp.UnsharpenMask.Normal);
                BufferedImage thumbnailImage = resizeOp.filter(originalImage, null);
                ImageIO.write(thumbnailImage, format, thumbnailStream);
            }
        } finally {
            if (originalStream != null) {
                originalStream.close();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.