| java.lang.Object org.jfree.chart.encoders.EncoderUtil
EncoderUtil | public class EncoderUtil (Code) | | A collection of utility methods for encoding images and returning them as a
byte[] or writing them directly to an OutputStream.
|
Method Summary | |
public static byte[] | encode(BufferedImage image, String format) Encode the image in a specific format.
Parameters: image - The image to be encoded. Parameters: format - The ImageFormat to use. | public static byte[] | encode(BufferedImage image, String format, boolean encodeAlpha) Encode the image in a specific format.
Parameters: image - The image to be encoded. Parameters: format - The ImageFormat to use. Parameters: encodeAlpha - Whether to encode alpha transparency (not supported by all ImageEncoders). | public static byte[] | encode(BufferedImage image, String format, float quality) Encode the image in a specific format.
Parameters: image - The image to be encoded. Parameters: format - The ImageFormat to use. Parameters: quality - The quality to use for the image encoding (not supportedby all ImageEncoders). | public static byte[] | encode(BufferedImage image, String format, float quality, boolean encodeAlpha) Encode the image in a specific format.
Parameters: image - The image to be encoded. Parameters: format - The ImageFormat to use. Parameters: quality - The quality to use for the image encoding (not supported by all ImageEncoders). Parameters: encodeAlpha - Whether to encode alpha transparency (not supported by all ImageEncoders). | public static void | writeBufferedImage(BufferedImage image, String format, OutputStream outputStream) Encode the image in a specific format and write it to an OutputStream. | public static void | writeBufferedImage(BufferedImage image, String format, OutputStream outputStream, float quality) Encode the image in a specific format and write it to an OutputStream. | public static void | writeBufferedImage(BufferedImage image, String format, OutputStream outputStream, boolean encodeAlpha) Encode the image in a specific format and write it to an OutputStream. | public static void | writeBufferedImage(BufferedImage image, String format, OutputStream outputStream, float quality, boolean encodeAlpha) Encode the image in a specific format and write it to an OutputStream. |
encode | public static byte[] encode(BufferedImage image, String format, boolean encodeAlpha) throws IOException(Code) | | Encode the image in a specific format.
Parameters: image - The image to be encoded. Parameters: format - The ImageFormat to use. Parameters: encodeAlpha - Whether to encode alpha transparency (not supported by all ImageEncoders). The byte[] that is the encoded image. throws: IOException - |
encode | public static byte[] encode(BufferedImage image, String format, float quality) throws IOException(Code) | | Encode the image in a specific format.
Parameters: image - The image to be encoded. Parameters: format - The ImageFormat to use. Parameters: quality - The quality to use for the image encoding (not supportedby all ImageEncoders). The byte[] that is the encoded image. throws: IOException - |
encode | public static byte[] encode(BufferedImage image, String format, float quality, boolean encodeAlpha) throws IOException(Code) | | Encode the image in a specific format.
Parameters: image - The image to be encoded. Parameters: format - The ImageFormat to use. Parameters: quality - The quality to use for the image encoding (not supported by all ImageEncoders). Parameters: encodeAlpha - Whether to encode alpha transparency (not supported by all ImageEncoders). The byte[] that is the encoded image. throws: IOException - |
writeBufferedImage | public static void writeBufferedImage(BufferedImage image, String format, OutputStream outputStream) throws IOException(Code) | | Encode the image in a specific format and write it to an OutputStream.
Parameters: image - The image to be encoded. Parameters: format - The ImageFormat to use. Parameters: outputStream - The OutputStream to write the encoded image to. throws: IOException - |
writeBufferedImage | public static void writeBufferedImage(BufferedImage image, String format, OutputStream outputStream, float quality) throws IOException(Code) | | Encode the image in a specific format and write it to an OutputStream.
Parameters: image - The image to be encoded. Parameters: format - The ImageFormat to use. Parameters: outputStream - The OutputStream to write the encoded image to. Parameters: quality - The quality to use for the image encoding (not supported by all ImageEncoders). throws: IOException - |
writeBufferedImage | public static void writeBufferedImage(BufferedImage image, String format, OutputStream outputStream, boolean encodeAlpha) throws IOException(Code) | | Encode the image in a specific format and write it to an OutputStream.
Parameters: image - The image to be encoded. Parameters: format - The ImageFormat to use. Parameters: outputStream - The OutputStream to write the encoded image to. Parameters: encodeAlpha - Whether to encode alpha transparency (not supported by all ImageEncoders). throws: IOException - |
writeBufferedImage | public static void writeBufferedImage(BufferedImage image, String format, OutputStream outputStream, float quality, boolean encodeAlpha) throws IOException(Code) | | Encode the image in a specific format and write it to an OutputStream.
Parameters: image - The image to be encoded. Parameters: format - The ImageFormat to use. Parameters: outputStream - The OutputStream to write the encoded image to. Parameters: quality - The quality to use for the image encoding (not supported by all ImageEncoders). Parameters: encodeAlpha - Whether to encode alpha transparency (not supported by all ImageEncoders). throws: IOException - |
|
|