de.htwdd.rosenkoenig.util
Class GreyFilter
java.lang.Object
java.awt.image.ImageFilter
java.awt.image.RGBImageFilter
de.htwdd.rosenkoenig.util.GreyFilter
- All Implemented Interfaces:
- java.awt.image.ImageConsumer, java.lang.Cloneable
public class GreyFilter
- extends java.awt.image.RGBImageFilter
More elaborate GreyFilter supporting brigtening of the Image
|
Field Summary |
private static int |
pBlu
|
private int |
pBri
Member that determines the amount the image will be brightened. |
private static int |
pGrn
|
private static int |
pRed
|
| Fields inherited from class java.awt.image.RGBImageFilter |
canFilterIndexColorModel, newmodel, origmodel |
| Fields inherited from class java.awt.image.ImageFilter |
consumer |
| Fields inherited from interface java.awt.image.ImageConsumer |
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT |
|
Constructor Summary |
GreyFilter()
Default constructor, uses the default brightness value of 140% |
GreyFilter(int percentage)
|
|
Method Summary |
int |
filterRGB(int x,
int y,
int rgb)
|
| Methods inherited from class java.awt.image.RGBImageFilter |
filterIndexColorModel, filterRGBPixels, setColorModel, setPixels, setPixels, substituteColorModel |
| Methods inherited from class java.awt.image.ImageFilter |
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setDimensions, setHints, setProperties |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pRed
private static final int pRed
- See Also:
- Constant Field Values
pGrn
private static final int pGrn
- See Also:
- Constant Field Values
pBlu
private static final int pBlu
- See Also:
- Constant Field Values
pBri
private int pBri
- Member that determines the amount the image will be brightened.
GreyFilter
GreyFilter()
- Default constructor, uses the default brightness value of 140%
GreyFilter
GreyFilter(int percentage)
- Parameters:
percentage - override the classes default percentage value for brightening the Image of
140%; use a negative value to darken the Image;
filterRGB
public int filterRGB(int x,
int y,
int rgb)
- Specified by:
filterRGB in class java.awt.image.RGBImageFilter
- Parameters:
x - x coordinate of the currently processed pixely - y coordinate of the currently processed pixelrgb - alpha, red, green, blue value of the pixel