For Rasters, the lookup operates on bands. The number of lookup arrays may be one, in which case the same array is applied to all bands, or it must equal the number of Source Raster bands.
For BufferedImages, the lookup operates on color and alpha components. The number of lookup arrays may be one, in which case the same array is applied to all color (but not alpha) components. Otherwise, the number of lookup arrays may equal the number of Source color components, in which case no lookup of the alpha component (if present) is performed. If neither of these cases apply, the number of lookup arrays must equal the number of Source color components plus alpha components, in which case lookup is performed for all color and alpha components. This allows non-uniform rescaling of multi-band BufferedImages.
BufferedImage sources with premultiplied alpha data are treated in the same manner as non-premultiplied images for purposes of the lookup. That is, the lookup is done per band on the raw data of the BufferedImage source without regard to whether the data is premultiplied. If a color conversion is required to the destination ColorModel, the premultiplied state of both source and destination will be taken into account for this step.
Images with an IndexColorModel cannot be used.
If a RenderingHints object is specified in the constructor, the color rendering hint and the dithering hint may be used when color conversion is required.
This class allows the Source to be the same as the Destination.
LookupTable, java.awt.RenderingHints#KEY_COLOR_RENDERING , java.awt.RenderingHints#KEY_DITHERING
| Modifier and Type | Field and Description |
|---|---|
| pack-priv RenderingHints | |
| private LookupTable | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | LookupOp(LookupTable
the specified lookup, RenderingHints LookupTablethe specified hints)RenderingHints,
or nullConstructs a |
| Modifier and Type | Method and Description |
|---|---|
| private void | byteFilter(ByteLookupTable lookup, Raster src, WritableRaster dst, int width, int height, int numBands)
|
| public BufferedImage | Returns: a filtered destinationBufferedImage.Source image for the filter operation. src, ColorModel the destination's destCM)ColorModel, which
can be null.Implements java. Creates a zeroed destination image with the correct size and number of bands. |
| public WritableRaster | Returns: the zeroed-destinationRaster.the src)Raster to be transformedImplements java. Creates a zeroed-destination |
| public final BufferedImage | Returns: the filteredBufferedImage.the src, BufferedImage BufferedImage to be filteredthe dst)BufferedImage in which to
store the results of the filter operationImplements java. Performs a lookup operation on a |
| public final WritableRaster | Returns: the filteredWritableRaster.the source src, WritableRaster Raster to filterthe destination dst)WritableRaster for the
filtered srcImplements java. Performs a lookup operation on a |
| public final Rectangle2D | Returns: the bounds of the filtered definition image.the src)BufferedImage to be filteredImplements java. Returns the bounding box of the filtered destination image. |
| public final Rectangle2D | Returns: the bounds of the filtered definitionRaster.the src)Raster to be filteredImplements java. Returns the bounding box of the filtered destination Raster. |
| public final Point2D | Returns: thePoint2D in the destination that
corresponds to the specified point in the source.a srcPt, Point2D Point2D that represents a point
in the source imagea dstPt)Point2D that represents the location
in the destinationImplements java. Returns the location of the destination point given a point in the source. |
| public final RenderingHints | Returns: theRenderingHints object associated
with this op.Implements java. Returns the rendering hints for this op. |
| public final LookupTable | |
| private void | shortFilter(ShortLookupTable lookup, Raster src, WritableRaster dst, int width, int height, int numBands)
|
| hints | back to summary |
|---|---|
| pack-priv RenderingHints hints | |
| ltable | back to summary |
|---|---|
| private LookupTable ltable | |
| numComponents | back to summary |
|---|---|
| private int numComponents | |
| LookupOp | back to summary |
|---|---|
| public LookupOp(LookupTable lookup, RenderingHints hints) Constructs a
| |
| byteFilter | back to summary |
|---|---|
| private void byteFilter(ByteLookupTable lookup, Raster src, WritableRaster dst, int width, int height, int numBands) | |
| createCompatibleDestImage | back to summary |
|---|---|
| public BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel destCM) Implements java. Creates a zeroed destination image with the correct size and number of
bands. If destCM is
| |
| createCompatibleDestRaster | back to summary |
|---|---|
| public WritableRaster createCompatibleDestRaster(Raster src) Implements java. Creates a zeroed-destination
| |
| filter | back to summary |
|---|---|
| public final BufferedImage filter(BufferedImage src, BufferedImage dst) Implements java. Performs a lookup operation on a
| |
| filter | back to summary |
|---|---|
| public final WritableRaster filter(Raster src, WritableRaster dst) Implements java. Performs a lookup operation on a
| |
| getBounds2D | back to summary |
|---|---|
| public final Rectangle2D getBounds2D(BufferedImage src) Implements java. Returns the bounding box of the filtered destination image. Since this is not a geometric operation, the bounding box does not change.
| |
| getBounds2D | back to summary |
|---|---|
| public final Rectangle2D getBounds2D(Raster src) Implements java. Returns the bounding box of the filtered destination Raster. Since this is not a geometric operation, the bounding box does not change.
| |
| getPoint2D | back to summary |
|---|---|
| public final Point2D getPoint2D(Point2D srcPt, Point2D dstPt) Implements java. Returns the location of the destination point given a
point in the source. If | |
| getRenderingHints | back to summary |
|---|---|
| public final RenderingHints getRenderingHints() Implements java. Returns the rendering hints for this op.
| |
| getTable | back to summary |
|---|---|
| public final LookupTable getTable() Returns the
| |
| shortFilter | back to summary |
|---|---|
| private void shortFilter(ShortLookupTable lookup, Raster src, WritableRaster dst, int width, int height, int numBands) | |