Class WholeImageFilter
- java.lang.Object
-
- org.jivesoftware.smackx.jingleold.mediaimpl.sshare.api.AbstractBufferedImageOp
-
- org.jivesoftware.smackx.jingleold.mediaimpl.sshare.api.WholeImageFilter
-
- All Implemented Interfaces:
java.awt.image.BufferedImageOp
,java.lang.Cloneable
- Direct Known Subclasses:
QuantizeFilter
public abstract class WholeImageFilter extends AbstractBufferedImageOp
A filter which acts as a superclass for filters which need to have the whole image in memory to do their stuff.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.Rectangle
originalSpace
The input image bounds.protected java.awt.Rectangle
transformedSpace
The output image bounds.
-
Constructor Summary
Constructors Constructor Description WholeImageFilter()
Construct a WholeImageFilter.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.awt.image.BufferedImage
filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
protected abstract int[]
filterPixels(int width, int height, int[] inPixels, java.awt.Rectangle transformedSpace)
Actually filter the pixels.protected void
transformSpace(java.awt.Rectangle rect)
Calculate output bounds for given input bounds.-
Methods inherited from class org.jivesoftware.smackx.jingleold.mediaimpl.sshare.api.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
-
-
-
Field Detail
-
transformedSpace
protected java.awt.Rectangle transformedSpace
The output image bounds.
-
originalSpace
protected java.awt.Rectangle originalSpace
The input image bounds.
-
-
Constructor Detail
-
WholeImageFilter
public WholeImageFilter()
Construct a WholeImageFilter.
-
-
Method Detail
-
filter
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
-
transformSpace
protected void transformSpace(java.awt.Rectangle rect)
Calculate output bounds for given input bounds.- Parameters:
rect
- input and output rectangle
-
filterPixels
protected abstract int[] filterPixels(int width, int height, int[] inPixels, java.awt.Rectangle transformedSpace)
Actually filter the pixels.- Parameters:
width
- the image widthheight
- the image heightinPixels
- the image pixelstransformedSpace
- the output bounds- Returns:
- the output pixels
-
-