public final class ImageUtils
extends java.lang.Object
| Constructor and Description |
|---|
ImageUtils() |
| Modifier and Type | Method and Description |
|---|---|
static TexturePixel |
color(TexturePixel pixel,
ColorRGBA lowIntensityColor,
ColorRGBA highIntensityColor)
The method sets a color for the given pixel by merging the two given colors.
|
static Image |
convertToGrayscaleTexture(Image source)
This method converts the given texture into black and whit (grayscale) texture.
|
static Image |
convertToNormalMapTexture(Image source,
float strengthFactor)
This method converts the given texture into normal-map texture.
|
static Image |
createEmptyImage(Image.Format format,
int width,
int height,
int depth)
Creates an image of the given size and depth.
|
static Image |
decompress(Image image)
This method decompresses the given image.
|
static void |
merge(Image targetImage,
Image sourceImage)
This method merges two given images.
|
static void |
mix(Image targetImage,
Image sourceImage)
This method merges two given images.
|
static Image |
resizeTo(Image source,
int width,
int height)
Resizes the image to the given width and height.
|
public static Image createEmptyImage(Image.Format format, int width, int height, int depth)
format - the image formatwidth - the image widthheight - the image heightdepth - the image depthpublic static TexturePixel color(TexturePixel pixel, ColorRGBA lowIntensityColor, ColorRGBA highIntensityColor)
pixel - the pixel that will have the colors alteredlowIntensityColor - the low intensity colorhighIntensityColor - the high intensity colorpublic static void merge(Image targetImage, Image sourceImage)
targetImage - the target imagesourceImage - the source imagepublic static void mix(Image targetImage, Image sourceImage)
targetImage - the target imagesourceImage - the source imagepublic static Image resizeTo(Image source, int width, int height)
source - the source image (this remains untouched, the new image instance is created)width - the target image widthheight - the target image heightpublic static Image convertToNormalMapTexture(Image source, float strengthFactor)
source - the source texturestrengthFactor - the normal strength factorpublic static Image convertToGrayscaleTexture(Image source)
source - the source texture