public class ImageProcessing
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
CROP_ALIGN_CENTER |
static int |
CROP_ALIGN_LEFT |
static int |
CROP_ALIGN_RIGHT |
static int |
CROP_VALIGN_BOTTOM |
static int |
CROP_VALIGN_CENTER |
static int |
CROP_VALIGN_TOP |
static int |
CROP_VALIGN_TOPCENTER |
| Modifier and Type | Method and Description |
|---|---|
static java.awt.image.BufferedImage |
addShadow(java.awt.image.BufferedImage image,
int xOffset,
int yOffset)
Adds a shadow effect by executing the following steps: 1.
|
static java.awt.Image |
applyAlphaChannel(java.awt.Image img,
java.awt.Color color)
All pixels that have the specified color are rendered transparent.
|
static java.awt.image.BufferedImage |
borderAlpha(java.awt.image.BufferedImage image,
java.awt.Color strokeColor,
boolean borderOnly) |
static java.awt.image.BufferedImage |
convertToGrayScale(java.awt.image.BufferedImage image) |
static java.awt.image.BufferedImage |
crop(java.awt.image.BufferedImage image,
int cropAlignment,
int cropVerticlaAlignment,
int width,
int height)
Crops a sub image from the specified image.
|
static java.awt.image.BufferedImage |
decodeToImage(java.lang.String imageString) |
static java.lang.String |
encodeToString(java.awt.image.BufferedImage image) |
static java.lang.String |
encodeToString(java.awt.image.BufferedImage image,
ImageFormat imageFormat) |
static java.awt.image.BufferedImage |
flashVisiblePixels(java.awt.Image image,
java.awt.Color flashColor)
All pixels that are not transparent are replaced by a pixel of the
specified flashColor.
|
static java.awt.image.BufferedImage |
flipSpritesHorizontally(Spritesheet sprite) |
static java.awt.image.BufferedImage |
flipSpritesVertically(Spritesheet sprite) |
static java.awt.image.BufferedImage |
getCompatibleImage(int width,
int height) |
static java.awt.image.BufferedImage |
getCopy(java.awt.image.BufferedImage bi) |
static java.awt.image.BufferedImage[][] |
getSubImages(java.awt.image.BufferedImage image,
int rows,
int columns) |
static java.awt.image.BufferedImage |
horizontalFlip(java.awt.image.BufferedImage img)
Horizontalflip.
|
static boolean |
isEmpty(java.awt.image.BufferedImage image) |
static boolean |
needsBorder(java.awt.image.BufferedImage image,
int x,
int y)
Needs border.
|
static java.awt.image.BufferedImage |
rotate(java.awt.image.BufferedImage bufferedImage,
double radians) |
static java.awt.image.BufferedImage |
rotate(java.awt.image.BufferedImage bufferedImage,
Rotation rotation) |
static java.awt.image.BufferedImage |
scaleImage(java.awt.image.BufferedImage image,
float factor) |
static java.awt.image.BufferedImage |
scaleImage(java.awt.image.BufferedImage image,
int max) |
static java.awt.image.BufferedImage |
scaleImage(java.awt.image.BufferedImage image,
int width,
int height)
The specified image is scaled to a new dimension with the specified width
and height.
|
static java.awt.image.BufferedImage |
scaleImage(java.awt.image.BufferedImage image,
int width,
int height,
boolean keepRatio) |
static java.awt.image.BufferedImage |
scaleImage(java.awt.image.BufferedImage image,
int width,
int height,
boolean keepRatio,
boolean fill) |
static java.awt.image.BufferedImage |
scaleImageWidth(java.awt.image.BufferedImage image,
int newWidth) |
static java.awt.image.BufferedImage |
setOpacity(java.awt.Image img,
float opacity) |
static java.awt.image.BufferedImage |
toBufferedImage(java.awt.Image img) |
static java.awt.image.BufferedImage |
verticalFlip(java.awt.image.BufferedImage img) |
static java.awt.image.BufferedImage |
zoom(java.awt.image.BufferedImage image,
float zoomLevel) |
public static final int CROP_ALIGN_CENTER
public static final int CROP_ALIGN_LEFT
public static final int CROP_ALIGN_RIGHT
public static final int CROP_VALIGN_BOTTOM
public static final int CROP_VALIGN_CENTER
public static final int CROP_VALIGN_TOP
public static final int CROP_VALIGN_TOPCENTER
public static java.awt.image.BufferedImage addShadow(java.awt.image.BufferedImage image,
int xOffset,
int yOffset)
image - the imagexOffset - the x offsetyOffset - the y offsetpublic static java.awt.Image applyAlphaChannel(java.awt.Image img,
java.awt.Color color)
img - the imgcolor - the colorpublic static java.awt.image.BufferedImage borderAlpha(java.awt.image.BufferedImage image,
java.awt.Color strokeColor,
boolean borderOnly)
public static boolean isEmpty(java.awt.image.BufferedImage image)
public static java.awt.image.BufferedImage crop(java.awt.image.BufferedImage image,
int cropAlignment,
int cropVerticlaAlignment,
int width,
int height)
image - The image to crop the sub-image from.cropAlignment - use the following consts: cropVerticlaAlignment - use the following consts: width - The width to crop.height - The height to crop.public static java.awt.image.BufferedImage decodeToImage(java.lang.String imageString)
public static java.lang.String encodeToString(java.awt.image.BufferedImage image)
public static java.lang.String encodeToString(java.awt.image.BufferedImage image,
ImageFormat imageFormat)
public static java.awt.image.BufferedImage flashVisiblePixels(java.awt.Image image,
java.awt.Color flashColor)
image - the imageflashColor - the flash colorpublic static java.awt.image.BufferedImage flipSpritesHorizontally(Spritesheet sprite)
public static java.awt.image.BufferedImage flipSpritesVertically(Spritesheet sprite)
public static java.awt.image.BufferedImage getCopy(java.awt.image.BufferedImage bi)
public static java.awt.image.BufferedImage getCompatibleImage(int width,
int height)
public static java.awt.image.BufferedImage[][] getSubImages(java.awt.image.BufferedImage image,
int rows,
int columns)
public static java.awt.image.BufferedImage horizontalFlip(java.awt.image.BufferedImage img)
img - the imgpublic static boolean needsBorder(java.awt.image.BufferedImage image,
int x,
int y)
image - the imagex - the xy - the ypublic static java.awt.image.BufferedImage rotate(java.awt.image.BufferedImage bufferedImage,
Rotation rotation)
public static java.awt.image.BufferedImage rotate(java.awt.image.BufferedImage bufferedImage,
double radians)
public static java.awt.image.BufferedImage scaleImage(java.awt.image.BufferedImage image,
int max)
public static java.awt.image.BufferedImage scaleImage(java.awt.image.BufferedImage image,
float factor)
public static java.awt.image.BufferedImage scaleImage(java.awt.image.BufferedImage image,
int width,
int height)
image - the imagewidth - the widthheight - the heightpublic static java.awt.image.BufferedImage scaleImage(java.awt.image.BufferedImage image,
int width,
int height,
boolean keepRatio)
public static java.awt.image.BufferedImage scaleImage(java.awt.image.BufferedImage image,
int width,
int height,
boolean keepRatio,
boolean fill)
public static java.awt.image.BufferedImage scaleImageWidth(java.awt.image.BufferedImage image,
int newWidth)
public static java.awt.image.BufferedImage setOpacity(java.awt.Image img,
float opacity)
public static java.awt.image.BufferedImage toBufferedImage(java.awt.Image img)
public static java.awt.image.BufferedImage verticalFlip(java.awt.image.BufferedImage img)
public static java.awt.image.BufferedImage zoom(java.awt.image.BufferedImage image,
float zoomLevel)
public static java.awt.image.BufferedImage convertToGrayScale(java.awt.image.BufferedImage image)