|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.image4j.util.ConvertUtil
public class ConvertUtil
Provides useful methods for converting images from one colour depth to another.
Constructor Summary | |
---|---|
ConvertUtil()
|
Method Summary | |
---|---|
static java.awt.image.BufferedImage |
convert1(java.awt.image.BufferedImage src)
Converts the source to 1-bit colour depth (monochrome). |
static java.awt.image.BufferedImage |
convert24(java.awt.image.BufferedImage src)
Converts the source image to 24-bit colour (RGB). |
static java.awt.image.BufferedImage |
convert32(java.awt.image.BufferedImage src)
Converts the source image to 32-bit colour with transparency (ARGB). |
static java.awt.image.BufferedImage |
convert4(java.awt.image.BufferedImage src)
Converts the source image to 4-bit colour using the default 16-colour palette: blackdark reddark green dark yellowdark bluedark magenta dark cyandark greylight grey redgreenyellowblue magentacyanwhite No transparency. |
static java.awt.image.BufferedImage |
convert4(java.awt.image.BufferedImage src,
int[] cmap)
Converts the source image to 4-bit colour using the given colour map. |
static java.awt.image.BufferedImage |
convert8(java.awt.image.BufferedImage src)
Converts the source image to 8-bit colour using the default 256-colour palette. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConvertUtil()
Method Detail |
---|
public static java.awt.image.BufferedImage convert1(java.awt.image.BufferedImage src)
src
- the source image to convert
public static java.awt.image.BufferedImage convert4(java.awt.image.BufferedImage src)
src
- the source image to convert
public static java.awt.image.BufferedImage convert4(java.awt.image.BufferedImage src, int[] cmap)
src
- the source image to convertcmap
- the colour map, which should contain no more than 16 entries
The entries are in the form RRGGBB (hex).
public static java.awt.image.BufferedImage convert8(java.awt.image.BufferedImage src)
src
- the source image to convert
public static java.awt.image.BufferedImage convert24(java.awt.image.BufferedImage src)
src
- the source image to convert
public static java.awt.image.BufferedImage convert32(java.awt.image.BufferedImage src)
src
- the source image to convert
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |