com.jhlabs.image

Class AbstractBufferedImageOp

Implemented Interfaces:
BufferedImageOp, Cloneable
Known Direct Subclasses:
ApplyMaskFilter, BicubicScaleFilter, BlockFilter, BorderFilter, BoxBlurFilter, ColorHalftoneFilter, CompositeFilter, CompoundFilter, ConvolveFilter, CropFilter, DeinterlaceFilter, DoGFilter, FeedbackFilter, FlipFilter, GlintFilter, GradientFilter, GradientWipeFilter, HalftoneFilter, InterpolateFilter, IteratedFilter, KeyFilter, LaplaceFilter, LensBlurFilter, MirrorFilter, MotionBlurFilter, MotionBlurOp, PointFilter, RenderTextFilter, ScaleFilter, ScratchFilter, ShadowFilter, SmartBlurFilter, TileImageFilter, TransformFilter, TransitionFilter, VariableBlurFilter, WholeImageFilter

public abstract class AbstractBufferedImageOp
extends java.lang.Object
implements BufferedImageOp, Cloneable

A convenience class which implements those methods of BufferedImageOp which are rarely changed.

Method Summary

Object
clone()
BufferedImage
createCompatibleDestImage(BufferedImage src, ColorModel dstCM)
Rectangle2D
getBounds2D(BufferedImage src)
Point2D
getPoint2D(Point2D srcPt, Point2D dstPt)
int[]
getRGB(BufferedImage image, int x, int y, int width, int height, int[] pixels)
A convenience method for getting ARGB pixels from an image.
RenderingHints
getRenderingHints()
void
setRGB(BufferedImage image, int x, int y, int width, int height, int[] pixels)
A convenience method for setting ARGB pixels in an image.

Method Details

clone

public Object clone()

createCompatibleDestImage

public BufferedImage createCompatibleDestImage(BufferedImage src,
                                               ColorModel dstCM)

getBounds2D

public Rectangle2D getBounds2D(BufferedImage src)

getPoint2D

public Point2D getPoint2D(Point2D srcPt,
                          Point2D dstPt)

getRGB

public int[] getRGB(BufferedImage image,
                    int x,
                    int y,
                    int width,
                    int height,
                    int[] pixels)
A convenience method for getting ARGB pixels from an image. This tries to avoid the performance penalty of BufferedImage.getRGB unmanaging the image.
Parameters:
image - a BufferedImage object
x - the left edge of the pixel block
y - the right edge of the pixel block
width - the width of the pixel arry
height - the height of the pixel arry
pixels - the array to hold the returned pixels. May be null.
Returns:
the pixels

getRenderingHints

public RenderingHints getRenderingHints()

setRGB

public void setRGB(BufferedImage image,
                   int x,
                   int y,
                   int width,
                   int height,
                   int[] pixels)
A convenience method for setting ARGB pixels in an image. This tries to avoid the performance penalty of BufferedImage.setRGB unmanaging the image.
Parameters:
image - a BufferedImage object
x - the left edge of the pixel block
y - the right edge of the pixel block
width - the width of the pixel arry
height - the height of the pixel arry
pixels - the array of pixels to set