
protected int destW idth;
protected Object outpixbuf;
protected int[ ] srccols;
protected int srcHeight;
protected int[ ] srcrows;
protected int srcW idth;
}
Hierar chy: Object→ ImageF ilter(Cloneable, ImageConsumer)→ ReplicateScaleF ilter
Subc lasses: AreaAveragingScaleF ilter
RescaleOp Ja va 1.2
java.awt.image
This class is a BufferedImageOp and a RasterOp that perfor ms a linear scaling on the com-
ponents of each pixel in an image by multiplying them by a scale factor and adding a
constant. When you create a RescaleOp, you specify either a single scale factor and a
single offset or an array of scale factors and an array of constants. If only one scale fac-
tor and constant are specified, then all color bands of the image are rescaled identi-
cally. Otherwise, there should be one scale factor and constant for each color band or
for each color band plus the alpha transparency band. In this case, each color band,
and possibly the alpha band, is rescaled independently.
To use a RescaleOp, simply pass a source and optional destination image or raster to the
filter() method. Because RescaleOp pr ocesses pixels independently of each other, you can
use the same objects as both source and destination. Because of the nature of the
rescaling, however, you cannot use LookupOp with images that use an IndexColorModel.
RescaleOp per forms a linear rescaling. If you want to perfor manonlinear rescaling, you
can do ...