public class JAIMapImageEncoder extends AbstractMapImageEncoder
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PARAM_QUALITY |
TYPE_3BYTE_BGR, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE, TYPE_BYTE_BINARY, TYPE_BYTE_GRAY, TYPE_BYTE_INDEXED, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE, TYPE_INT_BGR, TYPE_INT_RGB, TYPE_USHORT_555_RGB, TYPE_USHORT_565_RGB, TYPE_USHORT_GRAY
Constructor and Description |
---|
JAIMapImageEncoder() |
Modifier and Type | Method and Description |
---|---|
void |
encode(java.awt.image.BufferedImage image,
java.io.OutputStream os,
java.lang.String format,
java.lang.String params)
Encodes a BufferedImage to an OutputStream using the specified image format and parameters.
|
int |
getColorType(java.lang.String format,
java.lang.String params)
Returns the color type to use for the specified image format and parameters.
|
java.lang.String[] |
getSupportedFormat()
Returns an array of String that contains all supported image formats that are supported
by this MapImageEncoder.
|
normalizeImageFormat, parseParameters
public static final java.lang.String PARAM_QUALITY
public void encode(java.awt.image.BufferedImage image, java.io.OutputStream os, java.lang.String format, java.lang.String params) throws java.lang.Exception
MapImageEncoder
image
- the BufferedImage to encode.os
- the OutputStream to encode to.format
- the image format to encode with.params
- the parameter to use when encoding.java.lang.Exception
- if an exception occurs.public int getColorType(java.lang.String format, java.lang.String params)
MapImageEncoder
format
- an image format. (ex. "jpeg", "gif", etc.)params
- image format parameters.public java.lang.String[] getSupportedFormat()
MapImageEncoder