| javax.media.jai.GeometricOpImage com.sun.media.jai.opimage.SubsampleBinaryToGrayOpImage com.sun.media.jai.mlib.MlibSubsampleBinaryToGrayOpImage
MlibSubsampleBinaryToGrayOpImage | class MlibSubsampleBinaryToGrayOpImage extends SubsampleBinaryToGrayOpImage (Code) | | A mediaLib class extending GeometricOpImage to
subsample binary images to gray scale images. Image scaling operations
require rectilinear backwards mapping and padding by the resampling
filter dimensions.
When applying scale factors of scaleX, scaleY to a source image
with width of src_width and height of src_height, the resulting image
is defined to have the following bounds:
dst minX = floor(src minX * scaleX)
dst minY = floor(src minY * scaleY)
dst width = floor(src width * scaleX)
dst height = floor(src height * scaleY)
See Also: ScaleOpImage See Also: com.sun.media.jai.opimage.SubsampleBinaryToGrayOpImage |
Constructor Summary | |
public | MlibSubsampleBinaryToGrayOpImage(RenderedImage source, ImageLayout layout, Map config, float scaleX, float scaleY) Constructs a MlibSubsampleBinaryToGrayOpImage
from a RenderedImage source, x and y scale
object. |
Method Summary | |
protected Rectangle | backwardMapRect(Rectangle destRect, int sourceIndex) Returns the minimum bounding box of the region of the specified
source to which a particular Rectangle of the
destination will be mapped.
Parameters: destRect - the Rectangle in destination coordinates. Parameters: sourceIndex - the index of the source image. | protected void | computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect) Subsample (and condense) the given rectangle by the specified scale. |
MlibSubsampleBinaryToGrayOpImage | public MlibSubsampleBinaryToGrayOpImage(RenderedImage source, ImageLayout layout, Map config, float scaleX, float scaleY)(Code) | | Constructs a MlibSubsampleBinaryToGrayOpImage
from a RenderedImage source, x and y scale
object. The image dimensions are determined by forward-mapping
the source bounds, and are passed to the superclass constructor
by means of the layout parameter. Other fields of
the layout are passed through unchanged. If
layout is null , a new
ImageLayout will be constructor to hold the bounds
information.
The float rounding errors, such as 1.2 being
internally represented as 1.200001, are dealt with
the floatTol, which is set up so that only 1/10 of pixel
error will occur at the end of a line, which yields correct
results with Math.round() operation.
The repeatability is guaranteed with a one-time computed
tables for x-values and y-values.
Parameters: source - a RenderedImage . Parameters: layout - an ImageLayout optionally containingthe tile grid layout, SampleModel , andColorModel , or null .from this OpImage , or null . Ifnull , no caching will be performed. Parameters: scaleX - scale factor along x axis. Parameters: scaleY - scale factor along y axis. throws: IllegalArgumentException - if combining thesource bounds with the layout parameter results in negativeoutput width or height. |
backwardMapRect | protected Rectangle backwardMapRect(Rectangle destRect, int sourceIndex)(Code) | | Returns the minimum bounding box of the region of the specified
source to which a particular Rectangle of the
destination will be mapped.
Parameters: destRect - the Rectangle in destination coordinates. Parameters: sourceIndex - the index of the source image. a Rectangle indicating the source bounding box,or null if the bounding box is unknown. throws: IllegalArgumentException - if sourceIndex isnegative or greater than the index of the last source. throws: IllegalArgumentException - if destRect isnull . |
computeRect | protected void computeRect(Raster[] sources, WritableRaster dest, Rectangle destRect)(Code) | | Subsample (and condense) the given rectangle by the specified scale.
The sources are cobbled.
Parameters: sources - an array of sources, guarantee to provide allnecessary source data for computing the rectangle. Parameters: dest - a tile that contains the rectangle to be computed. Parameters: destRect - the rectangle within this OpImage to be processed. |
|
|