|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jhlabs.image.AbstractBufferedImageOp
com.jhlabs.image.BoxBlurFilter
public class BoxBlurFilter
A filter which performs a box blur on an image. The horizontal and vertical blurs can be specified separately and a number of iterations can be given which allows an approximation to Gaussian blur.
Constructor Summary | |
---|---|
BoxBlurFilter()
Construct a default BoxBlurFilter. |
|
BoxBlurFilter(float hRadius,
float vRadius,
int iterations)
Construct a BoxBlurFilter. |
Method Summary | |
---|---|
static void |
blur(int[] in,
int[] out,
int width,
int height,
float radius)
Blur and transpose a block of ARGB pixels. |
static void |
blurFractional(int[] in,
int[] out,
int width,
int height,
float radius)
|
java.awt.image.BufferedImage |
filter(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dst)
|
float |
getHRadius()
Get the horizontal size of the blur. |
int |
getIterations()
Get the number of iterations the blur is performed. |
boolean |
getPremultiplyAlpha()
Get whether to premultiply the alpha channel. |
float |
getRadius()
Get the size of the blur. |
float |
getVRadius()
Get the vertical size of the blur. |
void |
setHRadius(float 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(float radius)
Set both the horizontal and vertical sizes of the blur. |
void |
setVRadius(float vRadius)
Set the vertical size of the blur. |
java.lang.String |
toString()
|
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp |
---|
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BoxBlurFilter()
public BoxBlurFilter(float hRadius, float vRadius, int iterations)
hRadius
- the horizontal radius of blurvRadius
- the vertical radius of bluriterations
- the number of time to iterate the blurMethod Detail |
---|
public void setPremultiplyAlpha(boolean premultiplyAlpha)
premultiplyAlpha
- true to premultiply the alphagetPremultiplyAlpha()
public boolean getPremultiplyAlpha()
setPremultiplyAlpha(boolean)
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
public static void blur(int[] in, int[] out, int width, int height, float radius)
in
- the input pixelsout
- the output pixelswidth
- the width of the pixel arrayheight
- the height of the pixel arrayradius
- the radius of blurpublic static void blurFractional(int[] in, int[] out, int width, int height, float radius)
public void setHRadius(float hRadius)
hRadius
- the radius of the blur in the horizontal directiongetHRadius()
public float getHRadius()
setHRadius(float)
public void setVRadius(float vRadius)
vRadius
- the radius of the blur in the vertical directiongetVRadius()
public float getVRadius()
setVRadius(float)
public void setRadius(float radius)
radius
- the radius of the blur in both directionsgetRadius()
public float getRadius()
setRadius(float)
public void setIterations(int iterations)
iterations
- the number of iterationsgetIterations()
public int getIterations()
setIterations(int)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |