public class ImageUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.awt.image.BufferedImage |
createCompatibleImage(int width,
int height)
Creates a
BufferedImage with a pixel format compatible with the graphics
environment. |
static java.awt.image.BufferedImage |
createThumbnail(java.awt.image.BufferedImage image,
int thumbWidth)
Creates a thumbnail from an image.
|
static void |
flipImageVertically(java.awt.image.BufferedImage image)
Flips the supplied BufferedImage vertically.
|
public static void flipImageVertically(java.awt.image.BufferedImage image)
public static java.awt.image.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 java.awt.image.BufferedImage createThumbnail(java.awt.image.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 createdjava.lang.IllegalArgumentException
- If thumbWidth is greater than image.getWidth()Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.