|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrailo.runtime.img.filter.AbstractBufferedImageOp
railo.runtime.img.filter.ConvolveFilter
public abstract class ConvolveFilter
Field Summary | |
---|---|
static int |
CLAMP_EDGES
Clamp pixels off the edge to the nearest edge. |
static int |
WRAP_EDGES
Wrap pixels off the edge to the opposite edge. |
static int |
ZERO_EDGES
Treat pixels off the edge as zero. |
Constructor Summary | |
---|---|
ConvolveFilter()
Construct a filter with a null kernel. |
|
ConvolveFilter(float[] matrix)
Construct a filter with the given 3x3 kernel. |
|
ConvolveFilter(int rows,
int cols,
float[] matrix)
Construct a filter with the given kernel. |
|
ConvolveFilter(Kernel kernel)
Construct a filter with the given 3x3 kernel. |
Method Summary | |
---|---|
static void |
convolve(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha,
int edgeAction)
Convolve a block of pixels. |
static void |
convolve(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
int edgeAction)
Convolve a block of pixels. |
static void |
convolveH(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha,
int edgeAction)
Convolve with a kernel consisting of one row. |
static void |
convolveHV(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha,
int edgeAction)
Convolve with a 2D kernel. |
static void |
convolveV(Kernel kernel,
int[] inPixels,
int[] outPixels,
int width,
int height,
boolean alpha,
int edgeAction)
Convolve with a kernel consisting of one column. |
BufferedImage |
createCompatibleDestImage(BufferedImage src,
ColorModel dstCM)
|
BufferedImage |
filter(BufferedImage src,
BufferedImage dst)
|
BufferedImage |
filter(BufferedImage src,
Struct parameters)
|
Rectangle2D |
getBounds2D(BufferedImage src)
|
int |
getEdgeAction()
Get the action to perfomr for pixels off the image edges. |
Kernel |
getKernel()
Get the convolution kernel. |
Point2D |
getPoint2D(Point2D srcPt,
Point2D dstPt)
|
boolean |
getPremultiplyAlpha()
Get whether to premultiply the alpha channel. |
RenderingHints |
getRenderingHints()
|
boolean |
getUseAlpha()
Get whether to convolve the alpha channel. |
void |
setEdgeAction(String edgeAction)
Set the action to perfomr for pixels off the image edges. |
void |
setKernel(Kernel kernel)
Set the convolution kernel. |
void |
setPremultiplyAlpha(boolean premultiplyAlpha)
Set whether to premultiply the alpha channel. |
void |
setUseAlpha(boolean useAlpha)
Set whether to convolve the alpha channel. |
String |
toString()
|
Methods inherited from class railo.runtime.img.filter.AbstractBufferedImageOp |
---|
clone, getRGB, setRGB |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ZERO_EDGES
public static final int CLAMP_EDGES
public static final int WRAP_EDGES
Constructor Detail |
---|
public ConvolveFilter()
public ConvolveFilter(float[] matrix)
matrix
- an array of 9 floats containing the kernelpublic ConvolveFilter(int rows, int cols, float[] matrix)
rows
- the number of rows in the kernelcols
- the number of columns in the kernelmatrix
- an array of rows*cols floats containing the kernelpublic ConvolveFilter(Kernel kernel)
kernel
- the convolution kernelMethod Detail |
---|
public void setKernel(Kernel kernel)
kernel
- the kernelgetKernel()
public Kernel getKernel()
setKernel(java.awt.image.Kernel)
public void setEdgeAction(String edgeAction) throws ExpressionException
edgeAction
- the action
ExpressionException
public int getEdgeAction()
setEdgeAction(java.lang.String)
public void setUseAlpha(boolean useAlpha)
useAlpha
- true to convolve the alphagetUseAlpha()
public boolean getUseAlpha()
setUseAlpha(boolean)
public void setPremultiplyAlpha(boolean premultiplyAlpha)
premultiplyAlpha
- true to premultiply the alphagetPremultiplyAlpha()
public boolean getPremultiplyAlpha()
setPremultiplyAlpha(boolean)
public BufferedImage filter(BufferedImage src, BufferedImage dst)
filter
in interface BufferedImageOp
public BufferedImage createCompatibleDestImage(BufferedImage src, ColorModel dstCM)
createCompatibleDestImage
in interface BufferedImageOp
createCompatibleDestImage
in class AbstractBufferedImageOp
public Rectangle2D getBounds2D(BufferedImage src)
getBounds2D
in interface BufferedImageOp
getBounds2D
in class AbstractBufferedImageOp
public Point2D getPoint2D(Point2D srcPt, Point2D dstPt)
getPoint2D
in interface BufferedImageOp
getPoint2D
in class AbstractBufferedImageOp
public RenderingHints getRenderingHints()
getRenderingHints
in interface BufferedImageOp
getRenderingHints
in class AbstractBufferedImageOp
public static void convolve(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, int edgeAction)
kernel
- the kernelinPixels
- the input pixelsoutPixels
- the output pixelswidth
- the widthheight
- the heightedgeAction
- what to do at the edgespublic static void convolve(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, int edgeAction)
kernel
- the kernelinPixels
- the input pixelsoutPixels
- the output pixelswidth
- the widthheight
- the heightalpha
- include alpha channeledgeAction
- what to do at the edgespublic static void convolveHV(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, int edgeAction)
kernel
- the kernelinPixels
- the input pixelsoutPixels
- the output pixelswidth
- the widthheight
- the heightalpha
- include alpha channeledgeAction
- what to do at the edgespublic static void convolveH(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, int edgeAction)
kernel
- the kernelinPixels
- the input pixelsoutPixels
- the output pixelswidth
- the widthheight
- the heightalpha
- include alpha channeledgeAction
- what to do at the edgespublic static void convolveV(Kernel kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha, int edgeAction)
kernel
- the kernelinPixels
- the input pixelsoutPixels
- the output pixelswidth
- the widthheight
- the heightalpha
- include alpha channeledgeAction
- what to do at the edgespublic String toString()
toString
in class Object
public BufferedImage filter(BufferedImage src, Struct parameters) throws PageException
filter
in interface DynFiltering
PageException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |