|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.b3dgs.lionengine.utility.Images
public final class Images
Set of static functions related to image manipulation.
Method Summary | |
---|---|
static java.awt.image.BufferedImage |
applyFilter(java.awt.image.BufferedImage buffImage,
Filter filter)
Apply a filter to the input buffered image. |
static java.awt.image.BufferedImage |
applyMask(java.awt.Image img,
java.awt.Color keyColor)
Apply color mask to image. |
static java.awt.image.BufferedImage |
createBufferedImage(int width,
int height,
int transparency)
Create a compatible buffered image. |
static java.awt.image.VolatileImage |
createVolatileImage(int width,
int height,
int transparency)
Create a compatible volatile image. |
static int |
filterRGB(int rgb,
int fr,
int fg,
int fb)
Apply a filter rgb. |
static java.awt.image.BufferedImage |
flipHorizontal(java.awt.image.BufferedImage src)
Apply an horizontal flip to the input image. |
static java.awt.image.BufferedImage |
flipVertical(java.awt.image.BufferedImage src)
Apply a vertical flip to the input image. |
static java.awt.image.BufferedImage |
getBufferedImage(java.lang.String filename,
boolean alpha)
Get a buffered image from an image file. |
static java.awt.image.BufferedImage |
getRasterBuffer(java.awt.image.BufferedImage buf,
int fr,
int fg,
int fb,
int er,
int eg,
int eb,
int refSize)
|
static int |
getRasterColor(int i,
int[] data,
int max)
Get raster color. |
static java.awt.image.VolatileImage |
getVolatileImage(java.awt.image.BufferedImage bufImage)
Get a volatile image from a buffered image. |
static java.awt.image.VolatileImage |
getVolatileImage(java.lang.String filename,
int transparency)
Get a volatile image from an image file. |
static int[][] |
loadRaster(java.lang.String file)
Load a raster data from a file. |
static void |
optimizeGraphics(java.awt.Graphics2D g)
Optimize graphic to performance mode. |
static void |
optimizeGraphicsQuality(java.awt.Graphics2D g)
Enable all graphics improvment. |
static void |
optimizeGraphicsSpeed(java.awt.Graphics2D g)
Disable all graphics improvment. |
static java.awt.image.BufferedImage[] |
referenceSplit(java.awt.image.BufferedImage image,
int row,
int col)
Split an image into a reference of sub image (data shared). |
static java.awt.image.BufferedImage |
resize(java.awt.image.BufferedImage src,
int w,
int h)
Resize input buffered image. |
static java.awt.image.BufferedImage |
rotate(java.awt.image.BufferedImage src,
int angle)
Rotate input buffered image. |
static void |
saveImage(java.awt.image.BufferedImage image,
java.lang.String imagefile)
Save an image into a file. |
static java.awt.image.BufferedImage[] |
splitImage(java.awt.image.BufferedImage image,
int row,
int col)
Split an image into an array of sub image (data not shared). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.awt.image.BufferedImage createBufferedImage(int width, int height, int transparency)
width
- image width.height
- image height.transparency
- transparency value.
Transparency
public static java.awt.image.VolatileImage createVolatileImage(int width, int height, int transparency)
width
- image width.height
- image height.transparency
- transparency value.
Transparency
public static java.awt.image.BufferedImage getBufferedImage(java.lang.String filename, boolean alpha)
filename
- image filename.alpha
- true to enable alpha.
public static java.awt.image.VolatileImage getVolatileImage(java.lang.String filename, int transparency)
filename
- image filename.transparency
- transparency.
Transparency
public static java.awt.image.VolatileImage getVolatileImage(java.awt.image.BufferedImage bufImage)
bufImage
- input buffered image.
public static java.awt.image.BufferedImage applyMask(java.awt.Image img, java.awt.Color keyColor)
img
- image reference.keyColor
- color mask.
public static java.awt.image.BufferedImage[] referenceSplit(java.awt.image.BufferedImage image, int row, int col)
image
- image to split.row
- number of horizontal divisions.col
- number of vertical divisions.
public static java.awt.image.BufferedImage[] splitImage(java.awt.image.BufferedImage image, int row, int col)
image
- image to split.row
- number of horizontal divisions.col
- number of vertical divisions.
public static java.awt.image.BufferedImage rotate(java.awt.image.BufferedImage src, int angle)
src
- input buffered image.angle
- angle to apply in degree (0-359)
public static java.awt.image.BufferedImage resize(java.awt.image.BufferedImage src, int w, int h)
src
- input buffered image.w
- new width.h
- new height.
public static java.awt.image.BufferedImage flipHorizontal(java.awt.image.BufferedImage src)
src
- input buffered image.
public static java.awt.image.BufferedImage flipVertical(java.awt.image.BufferedImage src)
src
- input buffered image.
public static java.awt.image.BufferedImage applyFilter(java.awt.image.BufferedImage buffImage, Filter filter)
buffImage
- input image.filter
- filter to use.
public static void saveImage(java.awt.image.BufferedImage image, java.lang.String imagefile)
image
- image to save.imagefile
- image filename.public static int[][] loadRaster(java.lang.String file)
file
- raster file.
public static int filterRGB(int rgb, int fr, int fg, int fb)
rgb
- original rgb.fr
- red filter.fg
- green filter.fb
- blue filter.
public static int getRasterColor(int i, int[] data, int max)
i
- color offset.data
- raster data.max
- max offset.
public static java.awt.image.BufferedImage getRasterBuffer(java.awt.image.BufferedImage buf, int fr, int fg, int fb, int er, int eg, int eb, int refSize)
public static void optimizeGraphicsQuality(java.awt.Graphics2D g)
g
- graphic context.public static void optimizeGraphicsSpeed(java.awt.Graphics2D g)
g
- graphic context.public static void optimizeGraphics(java.awt.Graphics2D g)
g
- graphic context.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |