|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectzombie.core.utils.ImageUtils
public class ImageUtils
class to simplify images management.
Field Summary | |
---|---|
static boolean |
USE_MIPMAP
|
Method Summary | |
---|---|
static void |
depureTexture(Texture texture,
float limit)
removes mistakes which are present on some ruined gif or png . or problems you may have during the application of the blender-effect on images with transparents parts. |
static int |
getNextPowerOfTwo(int fold)
get the closest greater power of 2 to the fold number |
static int |
getNextPowerOfTwoHW(int fold)
get the closest greater power of 2 to the fold number This version check if the current computer's hardware support Not Power Of 2 texture: in this case this method will retourn the fold istead of the closest greater power of 2 value. |
static Texture |
getScreenShot()
|
static java.nio.ByteBuffer |
makeTransp(java.nio.ByteBuffer data,
int red,
int green,
int blue,
int widthHW,
int heightHW)
|
static java.nio.ByteBuffer |
makeTransp(java.nio.ByteBuffer data,
int red,
int green,
int blue,
int alpha,
int widthHW,
int heightHW)
|
static void |
saveBmpImage(Texture texture,
java.lang.String path)
saves a texture on a bmp file |
static void |
saveImage(Texture texture,
java.lang.String path,
java.lang.String format)
saves a texture on a image file example: ImageUtils.saveImage( myTexture, "C:\image.png", "png" ); |
static void |
saveJpgImage(Texture texture,
java.lang.String path)
saves a texture on a jpg file |
static void |
savePngImage(Texture texture,
java.lang.String path)
saves a texture on a png file |
static void |
setSmoothImageState(boolean value)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean USE_MIPMAP
Method Detail |
---|
public static void depureTexture(Texture texture, float limit)
texture
- source texturelimit
- a value [in range of 0:1] that indicates the depurepublic static int getNextPowerOfTwo(int fold)
fold
- The target number
public static int getNextPowerOfTwoHW(int fold)
fold
- The target number
public static Texture getScreenShot()
public static java.nio.ByteBuffer makeTransp(java.nio.ByteBuffer data, int red, int green, int blue, int widthHW, int heightHW)
public static java.nio.ByteBuffer makeTransp(java.nio.ByteBuffer data, int red, int green, int blue, int alpha, int widthHW, int heightHW)
public static void saveBmpImage(Texture texture, java.lang.String path)
texture
- the texture to savepath
- the file pathpublic static void saveImage(Texture texture, java.lang.String path, java.lang.String format)
texture
- the texture to savepath
- the file pathformat
- the type of image, for example: "bmp"public static void saveJpgImage(Texture texture, java.lang.String path)
texture
- the texture to savepath
- the file pathpublic static void savePngImage(Texture texture, java.lang.String path)
texture
- the texture to savepath
- the file pathpublic static void setSmoothImageState(boolean value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |