|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jtheque.utils.ui.ImageUtils
public final class ImageUtils
Utility class for image processing.
Method Summary | |
---|---|
static BufferedImage |
createCompatibleImage(BufferedImage image)
Create a compatible image from an existing image. |
static Image |
createCompatibleImage(int width,
int height)
Create a compatible image.In headless mode, this method will return a simple BufferedImage of type ARGB. |
static BufferedImage |
createCompatibleImage(int width,
int height,
int type)
Create a compatible image. |
static BufferedImage |
createReflection(BufferedImage image)
Create a reflection of the image. |
static BufferedImage |
createThumbnail(BufferedImage image,
int requestedThumbSize)
Create a thumbnail of an image. |
static boolean |
isHeadless()
Indicate if we are in a headless mode or normal. |
static BufferedImage |
openCompatibleImage(InputStream stream)
Open a compatible image form an input stream. |
static BufferedImage |
openCompatibleImageFromClassPath(String path)
Open a image from the classpath at the specified path. |
static BufferedImage |
openCompatibleImageFromFileSystem(String path)
Open an image from the file system at the specified path. |
static BufferedImage |
read(File file)
Read an image from a file. |
static BufferedImage |
read(InputStream stream)
Open an image from an input stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static BufferedImage createThumbnail(BufferedImage image, int requestedThumbSize)
image
- The source image.requestedThumbSize
- The requested size.
public static BufferedImage read(File file)
file
- The file to read from.
public static BufferedImage read(InputStream stream)
stream
- The stream to read from.
public static Image createCompatibleImage(int width, int height)
width
- The width.height
- The height.
isHeadless()
public static BufferedImage createCompatibleImage(int width, int height, int type)
width
- The width.height
- The height.type
- The type of the image.
isHeadless()
public static BufferedImage createCompatibleImage(BufferedImage image)
image
- The image to make compatible.
public static boolean isHeadless()
public static BufferedImage createReflection(BufferedImage image)
image
- The image to reflect.
public static BufferedImage openCompatibleImageFromClassPath(String path)
path
- The path to the image.
public static BufferedImage openCompatibleImageFromFileSystem(String path)
path
- The path to the image.
public static BufferedImage openCompatibleImage(InputStream stream)
stream
- The stream to use to open the image.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |