public class ImageUtil extends Object
| Constructor and Description |
|---|
ImageUtil() |
| Modifier and Type | Method and Description |
|---|---|
static BufferedImage |
convertToIndexColorImage(BufferedImage image)
Creates a copy of an image and during the process converts the image to an indexed color image.
|
static BufferedImage |
loadImage(String path)
Loads an image from a file on disk or in an archive (e.g., .jar).
|
static byte[][] |
scrapeColors(BufferedImage image)
Get's all of the unique colors in an image.
|
public static BufferedImage convertToIndexColorImage(BufferedImage image)
image - Image to convert.public static BufferedImage loadImage(String path) throws IOException
path - The name of the image file to load. This should be a relative path starting from anywhere in the
classpath. For example, 'images/foo.gif'.IOExceptionpublic static byte[][] scrapeColors(BufferedImage image)
image - The image.Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.