javax.media.jai
Class BorderExtenderCopy
java.lang.Object
|
+--javax.media.jai.BorderExtender
|
+--javax.media.jai.BorderExtenderCopy
- All Implemented Interfaces:
- Serializable
- public final class BorderExtenderCopy
- extends BorderExtender
A subclass of BorderExtender
that implements
border extension by filling all pixels outside of the image
bounds with copies of the edge pixels. For example, the image:
if extended by adding two extra rows to the top and bottom and
two extra columns on the left and right sides, would become:
A | A | A | B | C | C | C |
A | A | A | B | C | C | C |
A | A | A | B | C | C | C |
D | D | D | E | F | F | F |
G | G | G | H | I | I | I |
G | G | G | H | I | I | I |
G | G | G | H | I | I | I |
Although this type of extension is not particularly
visually appealing, it is very useful as a way of padding
source images prior to area or geometric operations, such as
convolution, scaling, or rotation.
- See Also:
BorderExtender
, Serialized Form
Method Summary |
void |
extend(WritableRaster raster,
PlanarImage im)
Fills in the portions of a given Raster that lie
outside the bounds of a given PlanarImage with
copies of the edge pixels of the image. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
extend
public final void extend(WritableRaster raster,
PlanarImage im)
- Fills in the portions of a given
Raster
that lie
outside the bounds of a given PlanarImage
with
copies of the edge pixels of the image.
The portion of raster
that lies within
im.getBounds()
is not altered.
- Overrides:
extend
in class BorderExtender
- Parameters:
raster
- The WritableRaster
the border area of
which is to be filled with copies of the edge pixels
of the image.im
- The PlanarImage
which will provide the
edge data with which to fill the border area of the
WritableRaster
.- Throws:
IllegalArgumentException
- if either parameter is
null
.