List of usage examples for java.awt.image ReplicateScaleFilter ReplicateScaleFilter
public ReplicateScaleFilter(int width, int height)
From source file:com.krawler.esp.handlers.FileUploadHandler.java
private BufferedImage scaleImage(Image sourceImage, int width, int height, int typeRGB) { ImageFilter filter = new ReplicateScaleFilter(width, height); ImageProducer producer = new FilteredImageSource(sourceImage.getSource(), filter); Image resizedImage = Toolkit.getDefaultToolkit().createImage(producer); return this.toBufferedImage(resizedImage, typeRGB); }
From source file:com.krawler.esp.handlers.genericFileUpload.java
private BufferedImage scaleImage(Image sourceImage, int width, int height) { ImageFilter filter = new ReplicateScaleFilter(width, height); ImageProducer producer = new FilteredImageSource(sourceImage.getSource(), filter); Image resizedImage = Toolkit.getDefaultToolkit().createImage(producer); return this.toBufferedImage(resizedImage); }
From source file:com.krawler.esp.handlers.genericFileUpload.java
private BufferedImage scaleCompanyImage(Image sourceImage, int width, int height) { ImageFilter filter = new ReplicateScaleFilter(width, height); ImageProducer producer = new FilteredImageSource(sourceImage.getSource(), filter); Image resizedImage = Toolkit.getDefaultToolkit().createImage(producer); return this.toBufferedCompanyImage(resizedImage); }
From source file:org.tolven.security.bean.DocProtectionBean.java
/** * Create a new scaled image using a filter. * @param sourceImage//from w ww . j a v a 2s. c o m * @param width The width of the resulting picture * @param height The height of the resulting picture * @return The Image */ static public Image scaleImage(Image sourceImage, int width, int height) { ImageFilter filter = new ReplicateScaleFilter(width, height); ImageProducer producer = new FilteredImageSource(sourceImage.getSource(), filter); return Toolkit.getDefaultToolkit().createImage(producer); }