org.bounce.image
Class BaseFilter
java.lang.Object
java.awt.image.ImageFilter
java.awt.image.RGBImageFilter
org.bounce.image.BaseFilter
- All Implemented Interfaces:
- ImageConsumer, Cloneable
- Direct Known Subclasses:
- BlueFilter, BrighterFilter, CyanFilter, DarkerFilter, GrayFilter, GreenFilter, MagentaFilter, RedFilter, SilhouetteFilter, YellowFilter
public abstract class BaseFilter
- extends RGBImageFilter
The base filter for all the image filters in the bounce package.
Contains a couple of handy Utility methods.
- Version:
- $Revision: 1.4 $, $Date: 2008/01/28 21:28:37 $
- Author:
- Edwin Dankert
Method Summary |
protected int |
getBlue(int rgb)
Gets the blue value out of the rgb value. |
protected int |
getGreen(int rgb)
Gets the green value out of the rgb value. |
protected int |
getNTSCValue(int rgb)
Converts the red green and blue values to one value. |
protected int |
getRed(int rgb)
Gets the red value out of the rgb value. |
protected int |
getRGB(int rgb,
int red,
int green,
int blue)
Returns the rgb value for the blue, red and green values. |
BaseFilter
public BaseFilter()
getRed
protected int getRed(int rgb)
- Gets the red value out of the rgb value.
- Parameters:
rgb
- the rgb value of the pixel.
- Returns:
- the red component value.
getBlue
protected int getBlue(int rgb)
- Gets the blue value out of the rgb value.
- Parameters:
rgb
- the rgb value of the pixel.
- Returns:
- the blue component value.
getGreen
protected int getGreen(int rgb)
- Gets the green value out of the rgb value.
- Parameters:
rgb
- the rgb value of the pixel.
- Returns:
- the green component value.
getRGB
protected int getRGB(int rgb,
int red,
int green,
int blue)
- Returns the rgb value for the blue, red and green values.
- Parameters:
rgb
- the previous rgb value of the pixel, with alpha value.red
- the red component value of the pixel.green
- the green component value of the pixel.blue
- the blue component value of the pixel.
- Returns:
- the rgb value.
getNTSCValue
protected int getNTSCValue(int rgb)
- Converts the red green and blue values to one value.
- Parameters:
rgb
- the rgb value of the pixel.
- Returns:
- a component value (between 0-255).
Copyright © 2002-2011 Edwin Dankert. All Rights Reserved.