com.alee.graphics.filters
Class PixelUtils
java.lang.Object
com.alee.graphics.filters.PixelUtils
public final class PixelUtils
- extends java.lang.Object
Some more useful math functions for image processing. These are becoming obsolete as we move to Java2D. Use MiscComposite instead.
Method Summary |
static int |
brightness(int rgb)
|
static int |
clamp(int c)
Clamp a value to the range 0..255 |
static int |
combinePixels(int rgb1,
int rgb2,
int op)
|
static int |
combinePixels(int rgb1,
int rgb2,
int op,
int extraAlpha)
|
static int |
combinePixels(int rgb1,
int rgb2,
int op,
int extraAlpha,
int channelMask)
|
static int |
interpolate(int v1,
int v2,
float f)
|
static boolean |
nearColors(int rgb1,
int rgb2,
int tolerance)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REPLACE
public static final int REPLACE
- See Also:
- Constant Field Values
NORMAL
public static final int NORMAL
- See Also:
- Constant Field Values
MIN
public static final int MIN
- See Also:
- Constant Field Values
MAX
public static final int MAX
- See Also:
- Constant Field Values
ADD
public static final int ADD
- See Also:
- Constant Field Values
SUBTRACT
public static final int SUBTRACT
- See Also:
- Constant Field Values
DIFFERENCE
public static final int DIFFERENCE
- See Also:
- Constant Field Values
MULTIPLY
public static final int MULTIPLY
- See Also:
- Constant Field Values
HUE
public static final int HUE
- See Also:
- Constant Field Values
SATURATION
public static final int SATURATION
- See Also:
- Constant Field Values
VALUE
public static final int VALUE
- See Also:
- Constant Field Values
COLOR
public static final int COLOR
- See Also:
- Constant Field Values
SCREEN
public static final int SCREEN
- See Also:
- Constant Field Values
AVERAGE
public static final int AVERAGE
- See Also:
- Constant Field Values
OVERLAY
public static final int OVERLAY
- See Also:
- Constant Field Values
CLEAR
public static final int CLEAR
- See Also:
- Constant Field Values
EXCHANGE
public static final int EXCHANGE
- See Also:
- Constant Field Values
DISSOLVE
public static final int DISSOLVE
- See Also:
- Constant Field Values
DST_IN
public static final int DST_IN
- See Also:
- Constant Field Values
ALPHA
public static final int ALPHA
- See Also:
- Constant Field Values
ALPHA_TO_GRAY
public static final int ALPHA_TO_GRAY
- See Also:
- Constant Field Values
PixelUtils
public PixelUtils()
clamp
public static int clamp(int c)
- Clamp a value to the range 0..255
interpolate
public static int interpolate(int v1,
int v2,
float f)
brightness
public static int brightness(int rgb)
nearColors
public static boolean nearColors(int rgb1,
int rgb2,
int tolerance)
combinePixels
public static int combinePixels(int rgb1,
int rgb2,
int op)
combinePixels
public static int combinePixels(int rgb1,
int rgb2,
int op,
int extraAlpha,
int channelMask)
combinePixels
public static int combinePixels(int rgb1,
int rgb2,
int op,
int extraAlpha)