public class ConvertUtil extends Object
| 构造器和说明 |
|---|
ConvertUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static BufferedImage |
convert1(BufferedImage src)
Converts the source to 1-bit colour depth (monochrome).
|
static BufferedImage |
convert24(BufferedImage src)
Converts the source image to 24-bit colour (RGB).
|
static BufferedImage |
convert32(BufferedImage src)
Converts the source image to 32-bit colour with transparency (ARGB).
|
static BufferedImage |
convert4(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 BufferedImage |
convert4(BufferedImage src,
int[] cmap)
Converts the source image to 4-bit colour
using the given colour map.
|
static BufferedImage |
convert8(BufferedImage src)
Converts the source image to 8-bit colour
using the default 256-colour palette.
|
public static BufferedImage convert1(BufferedImage src)
src - the source image to convertpublic static BufferedImage convert4(BufferedImage src)
src - the source image to convertpublic static BufferedImage convert4(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 BufferedImage convert8(BufferedImage src)
src - the source image to convertpublic static BufferedImage convert24(BufferedImage src)
src - the source image to convertpublic static BufferedImage convert32(BufferedImage src)
src - the source image to convertCopyright © 2021. All rights reserved.