|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vwp.awt.image.ImageUtils
public class ImageUtils
This class contains a collection of useful functions related to image manipulation and handling. Some of them are useful especially together with Java 3D
| Constructor Summary | |
|---|---|
ImageUtils()
Main constructor |
|
| Method Summary | |
|---|---|
BufferedImage |
createBufferedImage(byte[] b,
double scalingFactor)
Creates a BufferedImage out of a picture (.gif, .jpg, ...) |
BufferedImage |
createBufferedImage(byte[] b,
double scalingFactor,
boolean textureScaling)
Creates a BufferedImage out of a picture (.gif, .jpg, ...) |
BufferedImage |
createBufferedImage(byte[] b,
double scalingFactor,
boolean textureScaling,
Insets cropTexture)
Creates a BufferedImage out of a picture (.gif, .jpg, ...) |
int |
getClosestPowerOf2(int value)
Evaluates a value which is a power of two and nearest to the given value |
BufferedImage |
scaleBufferedImage(BufferedImage inBImg,
int w,
int h)
Scales a BufferedImage to a new size using a smooth scaling algorithm (Image.SCALE_SMOOTH) |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImageUtils()
| Method Detail |
|---|
public BufferedImage createBufferedImage(byte[] b,
double scalingFactor)
b - the loaded picture file inside a byte-arrayscalingFactor - factor which has to be used to prescale the image
public BufferedImage createBufferedImage(byte[] b,
double scalingFactor,
boolean textureScaling)
b - the loaded picture file inside a byte-arrayscalingFactor - factor which has to be used to prescale the image
public BufferedImage createBufferedImage(byte[] b,
double scalingFactor,
boolean textureScaling,
Insets cropTexture)
b - the loaded picture file inside a byte-arrayscalingFactor - factor which has to be used to prescale the imagetextureScaling - scale to a size which fits to the J3D texture
properties (width and height have to be a value equal to a power
of two
public int getClosestPowerOf2(int value)
value - - input value to which the power of two value has to be
searched
public BufferedImage scaleBufferedImage(BufferedImage inBImg,
int w,
int h)
inBImg - input BufferedImage which has to be scaledw - new width of the imageh - nwe height of the image
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||