Java Reference
In-Depth Information
of the java.awt.image package. This package also includes several versatile imple-
mentations of the interface that can generate the image-processing effects illus-
trated in Figure 11-11. Example 11-13 shows the code used to produce Figure
11-11. The code is straightforward: to process a BufferedImage , simply pass it to
the filter() method of a BufferedImageOp .
Figur e 11•11. Image pr ocessing with Buffer edImageOp
Example 11•13: ImageOps.java
package com.davidflanagan.examples.graphics;
import java.awt.*;
import java.awt.geom.*;
import java.awt.image.*;
import java.awt.color.*;
/** A demonstration of various image processing filters */
public class ImageOps implements GraphicsExample {
static final int WIDTH = 600, HEIGHT = 675;
// Size of our example
Search WWH ::




Custom Search