|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.twelvemonkeys.image.CopyDither
public class CopyDither
This BufferedImageOp simply copies pixels, converting to a
IndexColorModel.
| Field Summary | |
|---|---|
protected IndexColorModel |
indexColorModel
|
| Constructor Summary | |
|---|---|
CopyDither()
Creates a CopyDither, with no fixed
IndexColorModel. |
|
CopyDither(IndexColorModel pICM)
Creates a CopyDither, using the given
IndexColorModel for dithering into. |
|
| Method Summary | |
|---|---|
BufferedImage |
createCompatibleDestImage(BufferedImage pSource,
ColorModel pDestCM)
Creates a compatible BufferedImage to dither into. |
WritableRaster |
createCompatibleDestRaster(Raster pSrc)
Creates a compatible Raster to dither into. |
WritableRaster |
createCompatibleDestRaster(Raster pSrc,
IndexColorModel pIndexColorModel)
|
BufferedImage |
filter(BufferedImage pSource,
BufferedImage pDest)
Performs a single-input/single-output dither operation, applying basic Floyd-Steinberg error-diffusion to the image. |
WritableRaster |
filter(Raster pSource,
WritableRaster pDest)
Performs a single-input/single-output dither operation, applying basic Floyd-Steinberg error-diffusion to the image. |
WritableRaster |
filter(Raster pSource,
WritableRaster pDest,
IndexColorModel pColorModel)
Performs a single-input/single-output pixel copy operation. |
Rectangle2D |
getBounds2D(BufferedImage pSrc)
Returns the bounding box of the filtered destination image. |
Rectangle2D |
getBounds2D(Raster pSrc)
Returns the bounding box of the filtered destination Raster. |
Point2D |
getPoint2D(Point2D pSrcPt,
Point2D pDstPt)
Returns the location of the destination point given a point in the source. |
RenderingHints |
getRenderingHints()
Returns the rendering mHints for this op. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IndexColorModel indexColorModel
| Constructor Detail |
|---|
public CopyDither(IndexColorModel pICM)
CopyDither, using the given
IndexColorModel for dithering into.
pICM - an IndexColorModel.public CopyDither()
CopyDither, with no fixed
IndexColorModel. The colormodel will be generated for each
filtering, unless the dest image allready has an
IndexColorModel.
| Method Detail |
|---|
public final BufferedImage createCompatibleDestImage(BufferedImage pSource,
ColorModel pDestCM)
BufferedImage to dither into.
Only IndexColorModel allowed.
createCompatibleDestImage in interface BufferedImageOpBufferedImage
ImageFilterException - if pDestCM is not null or
an instance of IndexColorModel.public final WritableRaster createCompatibleDestRaster(Raster pSrc)
Raster to dither into.
Only IndexColorModel allowed.
createCompatibleDestRaster in interface RasterOppSrc -
WritableRaster
public final WritableRaster createCompatibleDestRaster(Raster pSrc,
IndexColorModel pIndexColorModel)
public final Rectangle2D getBounds2D(BufferedImage pSrc)
getBounds2D in interface BufferedImageOppSrc - the BufferedImage to be filtered
public final Rectangle2D getBounds2D(Raster pSrc)
getBounds2D in interface RasterOppSrc - the Raster to be filtered
Raster.
public final Point2D getPoint2D(Point2D pSrcPt,
Point2D pDstPt)
dstPt is not
null, it will be used to hold the return value.
Since this is not a geometric operation, the srcPt
will equal the dstPt.
getPoint2D in interface BufferedImageOpgetPoint2D in interface RasterOppSrcPt - a Point2D that represents a point
in the source imagepDstPt - a Point2Dthat represents the location
in the destination
Point2D in the destination that
corresponds to the specified point in the source.public final RenderingHints getRenderingHints()
getRenderingHints in interface BufferedImageOpgetRenderingHints in interface RasterOpRenderingHints object associated
with this op.
public final BufferedImage filter(BufferedImage pSource,
BufferedImage pDest)
filter in interface BufferedImageOppSource - the source imagepDest - the destiantion image
pDest was
null.
public final WritableRaster filter(Raster pSource,
WritableRaster pDest)
filter in interface RasterOppSource - pDest -
pDest was
null.
public final WritableRaster filter(Raster pSource,
WritableRaster pDest,
IndexColorModel pColorModel)
pSource - pDest - pColorModel -
pDest was
null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||