gestalt.util
Class ImageUtil
java.lang.Object
gestalt.util.ImageUtil
public class ImageUtil
- extends java.lang.Object
|
Method Summary |
static void |
add(ByteBitmap a,
ByteBitmap b)
|
static java.awt.image.BufferedImage |
blur(java.awt.image.BufferedImage image)
|
static java.awt.image.BufferedImage |
blur(java.awt.image.BufferedImage image,
int theRadius)
|
static ByteBitmap |
blur(ByteBitmap theImage,
int theRadius)
|
static java.awt.image.BufferedImage |
brighten(java.awt.image.BufferedImage image)
|
static ByteBitmap |
convertBufferedImage2ByteBitmap(java.awt.image.BufferedImage myImage)
|
static IntegerBitmap |
convertBufferedImage2IntegerBitmap(java.awt.image.BufferedImage theBitmap)
|
static java.awt.image.BufferedImage |
convertByteBitmap2BufferedImage(ByteBitmap theBitmap)
|
static java.awt.image.BufferedImage |
convertByteBitmap2BufferedImageBGR(ByteBitmap theBitmap)
|
static java.awt.image.BufferedImage |
convertIntegerBitmap2BufferedImage(IntegerBitmap theBitmap)
|
static java.awt.image.BufferedImage |
convolve(java.awt.image.BufferedImage image,
float[] elements,
int theWidth,
int theHeight)
|
static void |
convolve1DH(ByteBitmap theBitmap,
float[] theKernel)
|
static void |
convolve1DV(ByteBitmap theBitmap,
float[] theKernel)
|
static javax.swing.JFrame |
displayBitmap(Bitmap theBitamp)
|
static javax.swing.JFrame |
displayBitmap(Bitmap theBitamp,
java.lang.String theWindowName,
boolean theUndecorated)
|
static javax.swing.JFrame |
displayBufferedImage(java.awt.image.BufferedImage img,
java.lang.String theWindowName,
boolean theUndecorated)
|
static javax.swing.JFrame |
displayByteBufferAsImage(java.nio.ByteBuffer data,
int width,
int height,
java.lang.String theWindowName,
boolean theUndecorated)
|
static javax.swing.JFrame |
displayBytesAsImage(byte[] data,
int width,
int height,
int channels,
java.lang.String theWindowName,
boolean theUndecorated)
|
static javax.swing.JFrame |
displayIntsAsImage(int[] data,
int width,
int height,
java.lang.String theWindowName,
boolean theUndecorated)
|
static java.awt.image.BufferedImage |
edgeDetect(java.awt.image.BufferedImage image)
|
static void |
edgeDetection(ByteBitmap theBitmap,
float theValue)
|
static java.awt.image.BufferedImage |
filter(java.awt.image.BufferedImage image,
java.awt.image.BufferedImageOp op)
|
static java.awt.image.BufferedImage |
flip(java.awt.image.BufferedImage myImage,
int type)
|
static ByteBitmap |
flipBitmap(ByteBitmap theBitmap)
|
static java.awt.image.BufferedImage |
gaussianBlur(java.awt.image.BufferedImage image,
float sigma)
|
static void |
gaussianBlur(ByteBitmap theBitmap,
float theRadius)
there seems to be a problem with transparency. |
static int |
getNextPowerOf2(int theValue)
|
static void |
gradientCurve(ByteBitmap theBitmap,
Interpolator theInterpolator)
|
static void |
invert(ByteBitmap theBitmap,
boolean theInvertAlpha)
|
static boolean |
isPowerOf2(int theValue)
|
static java.awt.image.BufferedImage |
rotate(java.awt.image.BufferedImage image,
float theRadiansAngle)
|
static void |
save(java.awt.image.BufferedImage theImage,
java.lang.String theFileName,
int theImageFileFormat)
|
static void |
save(ByteBitmap myByteBitmap,
java.lang.String theFileName,
int theImageFileFormat)
|
static java.awt.image.BufferedImage |
scale(java.awt.image.BufferedImage theImage,
float theScale)
|
static ByteBitmap |
scale(ByteBitmap theImage,
float theScale)
|
static java.awt.image.BufferedImage |
scaleTo(java.awt.image.BufferedImage theImage,
int myWidth,
int myHeight)
|
static ByteBitmap |
scaleTo(ByteBitmap theImage,
int myWidth,
int myHeight)
|
static java.awt.image.BufferedImage |
sharpen(java.awt.image.BufferedImage image)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VERBOSE
public static boolean VERBOSE
HORIZONTAL
public static final int HORIZONTAL
- See Also:
- Constant Field Values
VERTICAL
public static final int VERTICAL
- See Also:
- Constant Field Values
ImageUtil
public ImageUtil()
save
public static void save(ByteBitmap myByteBitmap,
java.lang.String theFileName,
int theImageFileFormat)
save
public static void save(java.awt.image.BufferedImage theImage,
java.lang.String theFileName,
int theImageFileFormat)
isPowerOf2
public static boolean isPowerOf2(int theValue)
getNextPowerOf2
public static int getNextPowerOf2(int theValue)
flipBitmap
public static ByteBitmap flipBitmap(ByteBitmap theBitmap)
convertBufferedImage2ByteBitmap
public static ByteBitmap convertBufferedImage2ByteBitmap(java.awt.image.BufferedImage myImage)
convertByteBitmap2BufferedImage
public static java.awt.image.BufferedImage convertByteBitmap2BufferedImage(ByteBitmap theBitmap)
convertByteBitmap2BufferedImageBGR
public static java.awt.image.BufferedImage convertByteBitmap2BufferedImageBGR(ByteBitmap theBitmap)
convertIntegerBitmap2BufferedImage
public static java.awt.image.BufferedImage convertIntegerBitmap2BufferedImage(IntegerBitmap theBitmap)
convertBufferedImage2IntegerBitmap
public static IntegerBitmap convertBufferedImage2IntegerBitmap(java.awt.image.BufferedImage theBitmap)
invert
public static void invert(ByteBitmap theBitmap,
boolean theInvertAlpha)
gradientCurve
public static void gradientCurve(ByteBitmap theBitmap,
Interpolator theInterpolator)
edgeDetection
public static void edgeDetection(ByteBitmap theBitmap,
float theValue)
gaussianBlur
public static void gaussianBlur(ByteBitmap theBitmap,
float theRadius)
- there seems to be a problem with transparency.
- Parameters:
theBitmap - ByteBitmaptheRadius - float
convolve1DH
public static void convolve1DH(ByteBitmap theBitmap,
float[] theKernel)
convolve1DV
public static void convolve1DV(ByteBitmap theBitmap,
float[] theKernel)
flip
public static java.awt.image.BufferedImage flip(java.awt.image.BufferedImage myImage,
int type)
scale
public static ByteBitmap scale(ByteBitmap theImage,
float theScale)
scale
public static java.awt.image.BufferedImage scale(java.awt.image.BufferedImage theImage,
float theScale)
scaleTo
public static ByteBitmap scaleTo(ByteBitmap theImage,
int myWidth,
int myHeight)
scaleTo
public static java.awt.image.BufferedImage scaleTo(java.awt.image.BufferedImage theImage,
int myWidth,
int myHeight)
filter
public static java.awt.image.BufferedImage filter(java.awt.image.BufferedImage image,
java.awt.image.BufferedImageOp op)
convolve
public static java.awt.image.BufferedImage convolve(java.awt.image.BufferedImage image,
float[] elements,
int theWidth,
int theHeight)
blur
public static ByteBitmap blur(ByteBitmap theImage,
int theRadius)
blur
public static java.awt.image.BufferedImage blur(java.awt.image.BufferedImage image)
blur
public static java.awt.image.BufferedImage blur(java.awt.image.BufferedImage image,
int theRadius)
gaussianBlur
public static java.awt.image.BufferedImage gaussianBlur(java.awt.image.BufferedImage image,
float sigma)
sharpen
public static java.awt.image.BufferedImage sharpen(java.awt.image.BufferedImage image)
edgeDetect
public static java.awt.image.BufferedImage edgeDetect(java.awt.image.BufferedImage image)
brighten
public static java.awt.image.BufferedImage brighten(java.awt.image.BufferedImage image)
add
public static void add(ByteBitmap a,
ByteBitmap b)
rotate
public static java.awt.image.BufferedImage rotate(java.awt.image.BufferedImage image,
float theRadiansAngle)
displayBitmap
public static javax.swing.JFrame displayBitmap(Bitmap theBitamp,
java.lang.String theWindowName,
boolean theUndecorated)
displayBitmap
public static javax.swing.JFrame displayBitmap(Bitmap theBitamp)
displayBytesAsImage
public static javax.swing.JFrame displayBytesAsImage(byte[] data,
int width,
int height,
int channels,
java.lang.String theWindowName,
boolean theUndecorated)
displayByteBufferAsImage
public static javax.swing.JFrame displayByteBufferAsImage(java.nio.ByteBuffer data,
int width,
int height,
java.lang.String theWindowName,
boolean theUndecorated)
displayIntsAsImage
public static javax.swing.JFrame displayIntsAsImage(int[] data,
int width,
int height,
java.lang.String theWindowName,
boolean theUndecorated)
displayBufferedImage
public static javax.swing.JFrame displayBufferedImage(java.awt.image.BufferedImage img,
java.lang.String theWindowName,
boolean theUndecorated)
processing library gestalt_p5 by Patrick Kochlik + Dennis Paul. (c) 2009