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