public class ConvertUtil
extends java.lang.Object
构造器和说明 |
---|
ConvertUtil() |
限定符和类型 | 方法和说明 |
---|---|
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.
|
public static java.awt.image.BufferedImage convert1(java.awt.image.BufferedImage src)
src
- the source image to convertpublic static java.awt.image.BufferedImage convert4(java.awt.image.BufferedImage src)
src
- the source image to convertpublic 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 convertpublic static java.awt.image.BufferedImage convert24(java.awt.image.BufferedImage src)
src
- the source image to convertpublic static java.awt.image.BufferedImage convert32(java.awt.image.BufferedImage src)
src
- the source image to convert