by, 03-07-2012 at 05:02 PM (897 Views)
In addition to copying and scaling images, the Java 2D API also filter an image. Filtering is drawing or producing a new image by applying an algorithm to the pixels of the source image. Image filters can be applied by using the following method:
Java 2D API filters images along with copy or scaling the images. Filtering means producing a new images by applying algorithm to the source image pixels.
Implementation of filter is done by the BufferedImageOp. Given applet presents the image that is drawn at the top of next. You can drag the slider to represent the text via image and can make image transparent (more or less).Java Code:void Graphics2D.drawImage(BufferedImage img, BufferedImageOp op, int x, int y)