|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmaslab.util.ImageUtil
public class ImageUtil
Useful image utilities.
Constructor Summary | |
---|---|
ImageUtil()
|
Method Summary | |
---|---|
static java.awt.image.BufferedImage |
cloneImage(java.awt.image.BufferedImage in)
Clone an image. |
static java.awt.image.BufferedImage |
convertImage(java.awt.image.BufferedImage in,
int type)
Convert an image to a specified type. |
static java.awt.image.BufferedImage |
ditherImage(java.awt.image.BufferedImage in)
Convert an arbitrary input image into a black and white dithered image (using the Floyd-Steinberg dithering algorithm with auto thresholding) suitable for display on the lcd panel. |
static java.awt.image.BufferedImage |
downSample(java.awt.image.BufferedImage in,
int interval)
Downsample an image (obsolete; do not use) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageUtil()
Method Detail |
---|
public static java.awt.image.BufferedImage convertImage(java.awt.image.BufferedImage in, int type)
in
- The input image, in any format.type
- The desired type, e.g. BufferedImage.TYPE_3BYTE_BGR
public static java.awt.image.BufferedImage ditherImage(java.awt.image.BufferedImage in)
in
- The image to convert.
public static java.awt.image.BufferedImage downSample(java.awt.image.BufferedImage in, int interval)
in
- The image to downsample. It will not be modified.interval
- The sampling interval. If internval=n,The
output image will contain every nth pixel from the original
image, both vertically and horizontally. So the number of
pixels is reduced by n^2.
public static java.awt.image.BufferedImage cloneImage(java.awt.image.BufferedImage in)
in
- The image to be cloned.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |