java.awt.image
public class RescaleOp extends Object implements BufferedImageOp, RasterOp
Constructor Summary | |
---|---|
RescaleOp(float[] scaleFactors, float[] offsets, RenderingHints hints)
Create a new RescaleOp object using the given scale factors and offsets.
| |
RescaleOp(float scaleFactor, float offset, RenderingHints hints)
Create a new RescaleOp object using the given scale factor and offset.
|
Method Summary | |
---|---|
BufferedImage | createCompatibleDestImage(BufferedImage src, ColorModel dstCM) |
WritableRaster | createCompatibleDestRaster(Raster src) |
BufferedImage | filter(BufferedImage src, BufferedImage dst)
Converts the source image using the scale factors and offsets specified in
the constructor. |
WritableRaster | filter(Raster src, WritableRaster dest) |
Rectangle2D | getBounds2D(BufferedImage src) |
Rectangle2D | getBounds2D(Raster src) |
int | getNumFactors()
Returns the number of scaling factors / offsets.
|
float[] | getOffsets(float[] offsets)
Returns the offsets. |
Point2D | getPoint2D(Point2D src, Point2D dst) |
RenderingHints | getRenderingHints() |
float[] | getScaleFactors(float[] scaleFactors)
Returns the scaling factors. |
Parameters: scaleFactors an array of scale factors. offsets an array of offsets. hints any rendering hints to use (can be null).
Throws: NullPointerException if the scaleFactors or offsets array is null.
Parameters: scaleFactor the scale factor to use. offset the offset to use. hints any rendering hints to use (can be null).
Parameters: src The source image. dst The destination image.
Returns: The rescaled image.
Throws: IllegalArgumentException if the rasters and/or color spaces are incompatible.
Returns: the number of scaling factors / offsets.
Parameters: offsets array to store the offsets in (can be null).
Returns: an array of offsets.
Parameters: scaleFactors array to store the scaling factors in (can be null).
Returns: an array of scaling factors.