List of usage examples for java.awt Image getSource
public abstract ImageProducer getSource();
From source file:org.tolven.security.bean.DocProtectionBean.java
/** * Create a new scaled image using a filter. * @param sourceImage/*from w ww . ja v a2s .co 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); }