public abstract class ImageTool
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.awt.Image |
clone(java.awt.Image img)
Clones an image.
|
static java.awt.Image |
createTiledImage(java.awt.Image img,
int width,
int height)
Creates a tiled image with an image upto given width and height.
|
static java.awt.Image |
flipImageHorizontally(java.awt.Image img)
Flips an image horizontally.
|
static java.awt.Image |
flipImageVertically(java.awt.Image img)
Flips an image vertically.
|
static java.awt.Image |
getColoredImage(java.awt.Color color,
int width,
int height)
Creates a colored image with a specified color.
|
static java.awt.Image |
getEmptyImage(int width,
int height)
Creates an empty image with transparency.
|
static java.awt.Image |
mask(java.awt.Image img,
java.awt.Color color)
Makes a color in an Image transparent.
|
static java.awt.Image |
resize(java.awt.Image img,
int width,
int height)
Resizes a given image to given width and height.
|
static java.awt.Image |
rotate(java.awt.Image img,
double angle)
Rotates an image.
|
static java.awt.image.BufferedImage[] |
splitImage(java.awt.Image img,
int rows,
int cols)
Splits an image into a number of rows and columns.
|
static java.awt.image.BufferedImage |
toBufferedImage(java.awt.Image img)
Converts a given Image into a BufferedImage.
|
static java.awt.Image |
toImage(java.awt.image.BufferedImage bimage)
Converts a given BufferedImage into an Image.
|
public static java.awt.image.BufferedImage toBufferedImage(java.awt.Image img)
img
- The Image to be convertedpublic static java.awt.image.BufferedImage[] splitImage(java.awt.Image img, int rows, int cols)
img
- The image to be splitrows
- The number of rowscols
- The number of columnspublic static java.awt.Image toImage(java.awt.image.BufferedImage bimage)
bimage
- The BufferedImage to be convertedpublic static java.awt.Image resize(java.awt.Image img, int width, int height)
img
- The image to be resizedwidth
- The new widthheight
- The new heightpublic static java.awt.Image createTiledImage(java.awt.Image img, int width, int height)
img
- The source imagewidth
- The width of image to be createdheight
- The height of the image to be createdpublic static java.awt.Image getEmptyImage(int width, int height)
width
- The width of required imageheight
- The height of required imagepublic static java.awt.Image getColoredImage(java.awt.Color color, int width, int height)
color
- The color to be filled withwidth
- The width of the required imageheight
- The height of the required imagepublic static java.awt.Image flipImageHorizontally(java.awt.Image img)
img
- The source imagepublic static java.awt.Image flipImageVertically(java.awt.Image img)
img
- The source imagepublic static java.awt.Image clone(java.awt.Image img)
img
- The image to be clonedpublic static java.awt.Image rotate(java.awt.Image img, double angle)
img
- The image to be rotatedangle
- The angle in degreespublic static java.awt.Image mask(java.awt.Image img, java.awt.Color color)