public class GrayExceptOp extends IdentityOp
Constructor and Description |
---|
GrayExceptOp(int r,
int g,
int b)
Explicit Value Constructor.
|
GrayExceptOp(int r,
int g,
int b,
Metric metric)
Explicit Value Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.awt.image.BufferedImage |
filter(java.awt.image.BufferedImage src,
java.awt.image.BufferedImage dest)
Perform the filtering operation.
|
void |
setMetric(Metric metric)
Set the Metric to use to calculate the distance
between two colors.
|
createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints
public GrayExceptOp(int r, int g, int b)
r
- The red component of the color to leaveg
- The green component of the color to leaveb
- The blue component of the color to leavepublic GrayExceptOp(int r, int g, int b, Metric metric)
r
- The red component of the color to leaveg
- The green component of the color to leaveb
- The blue component of the color to leavemetric
- The Metric to use to determine if two colors are similarpublic java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dest)
filter
in interface java.awt.image.BufferedImageOp
filter
in class IdentityOp
src
- The source imagedest
- An empty image in which to store the result (or null)public void setMetric(Metric metric)
metric
- The Metric to use