public class GaussianFilter extends ConvolveFilter
Modifier and Type | Field and Description |
---|---|
protected Kernel |
kernel
The convolution kernel.
|
protected float |
radius
The blur radius.
|
alpha, CLAMP_EDGES, premultiplyAlpha, WRAP_EDGES, ZERO_EDGES
filterListener
Constructor and Description |
---|
GaussianFilter()
Construct a Gaussian filter.
|
GaussianFilter(float radius)
Construct a Gaussian filter.
|
Modifier and Type | Method and Description |
---|---|
static void |
convolveAndTranspose(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha,
boolean premultiply,
boolean unpremultiply,
int edgeAction)
Blur and transpose a block of ARGB pixels.
|
BufferedImage |
filter(BufferedImage src,
BufferedImage dst) |
float |
getRadius()
Get the radius of the kernel.
|
static Kernel |
makeKernel(float radius)
Make a Gaussian blur kernel.
|
void |
setRadius(float radius)
Set the radius of the kernel, and hence the amount of blur.
|
String |
toString() |
convolve, convolve, convolveH, convolveHV, convolveV, createCompatibleDestImage, getBounds2D, getEdgeAction, getKernel, getPoint2D, getPremultiplyAlpha, getRenderingHints, getUseAlpha, setEdgeAction, setKernel, setPremultiplyAlpha, setUseAlpha
clone, createCompatibleDestImage, filterDone, filterInitialize, filterProgress, filterStart, getMetaData, getRGB, setFilterListener, setRGB
protected float radius
protected Kernel kernel
public GaussianFilter()
public GaussianFilter(float radius)
radius
- blur radius in pixelspublic void setRadius(float radius)
radius
- the radius of the blur in pixels.getRadius()
public float getRadius()
setRadius(float)
public BufferedImage filter(BufferedImage src, BufferedImage dst)
filter
in interface BufferedImageOp
filter
in class ConvolveFilter
public static void convolveAndTranspose(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, boolean premultiply, boolean unpremultiply, int edgeAction)
kernel
- the blur kernelinPixels
- the input pixelsoutPixels
- the output pixelswidth
- the width of the pixel arrayheight
- the height of the pixel arrayalpha
- whether to blur the alpha channeledgeAction
- what to do at the edgespublic static Kernel makeKernel(float radius)
radius
- the blur radiuspublic String toString()
toString
in class ConvolveFilter
Copyright © 2012-2013 Bambi Software Foundation. All Rights Reserved.