public class ImageUtil extends Object
Modifier and Type | Method and Description |
---|---|
static BufferedImage |
createCompatibleImage(int width,
int height)
Creates a
BufferedImage with a pixel format compatible with the graphics
environment. |
static BufferedImage |
createThumbnail(BufferedImage image,
int thumbWidth)
Creates a thumbnail from an image.
|
static void |
flipImageVertically(BufferedImage image)
Flips the supplied BufferedImage vertically.
|
public static void flipImageVertically(BufferedImage image)
public static BufferedImage createCompatibleImage(int width, int height)
BufferedImage
with a pixel format compatible with the graphics
environment. The returned image can thus benefit from hardware accelerated operations
in Java2D API.width
- The width of the image to be createdheight
- The height of the image to be createdBufferedImage
with a type compatible with the graphics card.public static BufferedImage createThumbnail(BufferedImage image, int thumbWidth)
BufferedImage
. The original picture is not modified.image
- The original image to sample downthumbWidth
- The width of the thumbnail to be createdIllegalArgumentException
- If thumbWidth is greater than image.getWidth()Copyright 2010 JogAmp Community.