Package com.kheops.util.encoders
Class PngMapImageEncoder
java.lang.Object
com.kheops.util.encoders.AbstractMapImageEncoder
com.kheops.util.encoders.PngMapImageEncoder
- All Implemented Interfaces:
MapImageEncoder
-
Field Summary
Fields inherited from interface com.kheops.util.encoders.MapImageEncoder
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(BufferedImage im, OutputStream os, String format, String params) Encodes a BufferedImage to an OutputStream using the specified image format and parameters.int
getColorType
(String format, String params) Returns the color type to use for the specified image format and parameters.String[]
Returns an array of String that contains all supported image formats that are supported by this MapImageEncoder.Methods inherited from class com.kheops.util.encoders.AbstractMapImageEncoder
normalizeImageFormat, parseParameters
-
Constructor Details
-
PngMapImageEncoder
public PngMapImageEncoder()
-
-
Method Details
-
encode
public void encode(BufferedImage im, OutputStream os, String format, String params) throws Exception Description copied from interface:MapImageEncoder
Encodes a BufferedImage to an OutputStream using the specified image format and parameters.- Parameters:
im
- the BufferedImage to encode.os
- the OutputStream to encode to.format
- the image format to encode with.params
- the parameter to use when encoding.- Throws:
Exception
- if an exception occurs.
-
getColorType
Returns the color type to use for the specified image format and parameters.- Parameters:
format
- an image format. (ex. "jpeg", "gif", etc.)params
- image format parameters.- Returns:
- the color type to use for the specified image format and parameters.
-
getSupportedFormat
Returns an array of String that contains all supported image formats that are supported by this MapImageEncoder.- Returns:
- an array of String that contains all supported image formats that are supported by this MapImageEncoder.
-