public class ImageTransformations
extends java.lang.Object
Constructor and Description |
---|
ImageTransformations() |
Modifier and Type | Method and Description |
---|---|
static void |
convertToBinaryImage(java.awt.image.BufferedImage pImage,
int iThreshold)
Converts the specified image to a binary image by using a treshold that decides at which value a pixel will be set to white.
|
static java.awt.image.BufferedImage |
convertToBinaryImageCopy(java.awt.image.BufferedImage pImage,
int iThreshold)
Returns a binary image copy of the specified image by using a treshold that decides at which value a pixel will be set to white.
|
static void |
convertToGrayscaleImage(java.awt.image.BufferedImage pImage)
Converts the specified image to a gray scale image.
|
static void |
convertToGrayscaleImage2(java.awt.image.BufferedImage pImage)
Converts the specified image to a gray scale image by using conversion methods of the java API.
|
static java.awt.image.BufferedImage |
convertToGrayscaleImage2Copy(java.awt.image.BufferedImage pImage)
Returns a gray scale converted copy of the specified image by using conversion methods of the java API.
|
static java.awt.image.BufferedImage |
convertToGrayscaleImageCopy(java.awt.image.BufferedImage pImage,
ImageEffect pEffect)
Returns a gray scale converted copy of the specified image.
|
static void |
convertToLuminanceImage(java.awt.image.BufferedImage pImage)
Converts the specified image to a gray scale image by using the luminance formula.
|
static java.awt.image.BufferedImage |
copyImage(java.awt.image.BufferedImage pImage)
Returns a copy of the specified image.
|
static java.awt.image.BufferedImage |
getColorReducedImageCopy(java.awt.image.BufferedImage pImage,
int iColorNumPerChannel)
Returns a copy of the specified image with the specified number of colors.
|
static java.awt.image.BufferedImage |
getColorReducedImageCopy(java.awt.image.BufferedImage pImage,
int[] pColorNumPerChannel)
Returns a copy of the specified image with the specified number of colors per channel.
|
static void |
invertImage(java.awt.image.BufferedImage pImage)
Inverts the specified image.
|
static java.awt.image.BufferedImage |
invertImageCopy(java.awt.image.BufferedImage pImage)
Returns the inverted version of the speicified image.
|
public static java.awt.image.BufferedImage copyImage(java.awt.image.BufferedImage pImage)
pImage
- The image that should be copied.public static void invertImage(java.awt.image.BufferedImage pImage)
pImage
- The image that should be inverted.public static java.awt.image.BufferedImage invertImageCopy(java.awt.image.BufferedImage pImage)
pImage
- The image that should be inverted.public static void convertToGrayscaleImage(java.awt.image.BufferedImage pImage)
pImage
- The image that should be converted to a gray scale image.public static java.awt.image.BufferedImage convertToGrayscaleImageCopy(java.awt.image.BufferedImage pImage, ImageEffect pEffect)
pImage
- The image that should be converted to a gray scale image.pEffect
- The image effect object that is used to check if the process is still running. (TO DO: switch to a listener interface!)public static void convertToGrayscaleImage2(java.awt.image.BufferedImage pImage)
pImage
- The image that should be converted to a gray scale image.public static java.awt.image.BufferedImage convertToGrayscaleImage2Copy(java.awt.image.BufferedImage pImage)
pImage
- The image that should be converted to a gray scale image.public static void convertToLuminanceImage(java.awt.image.BufferedImage pImage)
pImage
- The image that should be converted to a gray scale image.public static void convertToBinaryImage(java.awt.image.BufferedImage pImage, int iThreshold)
pImage
- The image that should be converted to a binary image.iThreshold
- The threshold as integer deciding if the pixel should be set to white or black.public static java.awt.image.BufferedImage convertToBinaryImageCopy(java.awt.image.BufferedImage pImage, int iThreshold)
pImage
- The image that should be converted to a binary image.iThreshold
- The threshold as integer deciding if the pixel should be set to white or black.public static java.awt.image.BufferedImage getColorReducedImageCopy(java.awt.image.BufferedImage pImage, int iColorNumPerChannel)
pImage
- The image that should be converted to a binary image.iColorNumPerChannel
- The number of colors that should be used in the result image.public static java.awt.image.BufferedImage getColorReducedImageCopy(java.awt.image.BufferedImage pImage, int[] pColorNumPerChannel)
pImage
- The image that should be converted to a binary image.pColorNumPerChannel
- The number of colors per channel that should be used in the result image.