com.jhlabs.image
Class VariableBlurFilter
- BufferedImageOp, Cloneable
public class VariableBlurFilter
A filter which performs a box blur with a different blur radius at each pixel. The radius can either be specified by
providing a blur mask image or by overriding the blurRadiusAt method.
void | blur(int[] in, int[] out, int width, int height, int radius, int pass)
|
protected float | blurRadiusAt(int x, int y, int width, int height) - Override this to get a different blur radius at eahc point.
|
BufferedImage | createCompatibleDestImage(BufferedImage src, ColorModel dstCM)
|
BufferedImage | filter(BufferedImage src, BufferedImage dst)
|
BufferedImage | getBlurMask() - Get the mask used to give the amount of blur at each point.
|
Rectangle2D | getBounds2D(BufferedImage src)
|
int | getHRadius() - Get the horizontal size of the blur.
|
int | getIterations() - Get the number of iterations the blur is performed.
|
Point2D | getPoint2D(Point2D srcPt, Point2D dstPt)
|
boolean | getPremultiplyAlpha() - Get whether to premultiply the alpha channel.
|
int | getRadius() - Get the radius of the effect.
|
RenderingHints | getRenderingHints()
|
int | getVRadius() - Get the vertical size of the blur.
|
void | setBlurMask(BufferedImage blurMask) - Set the mask used to give the amount of blur at each point.
|
void | setHRadius(int hRadius) - Set the horizontal size of the blur.
|
void | setIterations(int iterations) - Set the number of iterations the blur is performed.
|
void | setPremultiplyAlpha(boolean premultiplyAlpha) - Set whether to premultiply the alpha channel.
|
void | setRadius(int radius) - Set the radius of the effect.
|
void | setVRadius(int vRadius) - Set the vertical size of the blur.
|
String | toString()
|
blur
public void blur(int[] in,
int[] out,
int width,
int height,
int radius,
int pass)
blurRadiusAt
protected float blurRadiusAt(int x,
int y,
int width,
int height)
Override this to get a different blur radius at eahc point.
x
- the x coordinatey
- the y coordinatewidth
- the width of the imageheight
- the height of the image
filter
public BufferedImage filter(BufferedImage src,
BufferedImage dst)
getBlurMask
public BufferedImage getBlurMask()
Get the mask used to give the amount of blur at each point.
getHRadius
public int getHRadius()
Get the horizontal size of the blur.
- the radius of the blur in the horizontal direction
getIterations
public int getIterations()
Get the number of iterations the blur is performed.
getPremultiplyAlpha
public boolean getPremultiplyAlpha()
Get whether to premultiply the alpha channel.
- true to premultiply the alpha
getRadius
public int getRadius()
Get the radius of the effect.
getVRadius
public int getVRadius()
Get the vertical size of the blur.
- the radius of the blur in the vertical direction
setBlurMask
public void setBlurMask(BufferedImage blurMask)
Set the mask used to give the amount of blur at each point.
setHRadius
public void setHRadius(int hRadius)
Set the horizontal size of the blur.
hRadius
- the radius of the blur in the horizontal direction
setIterations
public void setIterations(int iterations)
Set the number of iterations the blur is performed.
iterations
- the number of iterations
setPremultiplyAlpha
public void setPremultiplyAlpha(boolean premultiplyAlpha)
Set whether to premultiply the alpha channel.
premultiplyAlpha
- true to premultiply the alpha
setRadius
public void setRadius(int radius)
Set the radius of the effect.
setVRadius
public void setVRadius(int vRadius)
Set the vertical size of the blur.
vRadius
- the radius of the blur in the vertical direction
toString
public String toString()