Class PixelUtils
- java.lang.Object
-
- org.jivesoftware.smackx.jingleold.mediaimpl.sshare.api.PixelUtils
-
public 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.
-
-
Field Summary
Fields Modifier and Type Field Description static intADDstatic intALPHAstatic intALPHA_TO_GRAYstatic intAVERAGEstatic intCLEARstatic intCOLORstatic intDIFFERENCEstatic intDISSOLVEstatic intDST_INstatic intEXCHANGEstatic intHUEstatic intMAXstatic intMINstatic intMULTIPLYstatic intNORMALstatic intOVERLAYstatic intREPLACEstatic intSATURATIONstatic intSCREENstatic intSUBTRACTstatic intVALUE
-
Constructor Summary
Constructors Constructor Description PixelUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intbrightness(int rgb)static intclamp(int c)Clamp a value to the range 0..255.static intcombinePixels(int rgb1, int rgb2, int op)static intcombinePixels(int rgb1, int rgb2, int op, int extraAlpha)static intcombinePixels(int rgb1, int rgb2, int op, int extraAlpha, int channelMask)static intinterpolate(int v1, int v2, float f)static booleannearColors(int rgb1, int rgb2, int tolerance)
-
-
-
Field Detail
-
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
-
-
Constructor Detail
-
PixelUtils
public PixelUtils()
-
-
Method Detail
-
clamp
public static int clamp(int c)
Clamp a value to the range 0..255.- Parameters:
c- the input integer.- Returns:
- the output integer.
-
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)
-
-