|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.chart.encoders.EncoderUtil
public class EncoderUtil
A collection of utility methods for encoding images and returning them as a byte[] or writing them directly to an OutputStream.
Constructor Summary | |
---|---|
EncoderUtil()
|
Method Summary | |
---|---|
static byte[] |
encode(java.awt.image.BufferedImage image,
java.lang.String format)
Encode the image in a specific format. |
static byte[] |
encode(java.awt.image.BufferedImage image,
java.lang.String format,
boolean encodeAlpha)
Encode the image in a specific format. |
static byte[] |
encode(java.awt.image.BufferedImage image,
java.lang.String format,
float quality)
Encode the image in a specific format. |
static byte[] |
encode(java.awt.image.BufferedImage image,
java.lang.String format,
float quality,
boolean encodeAlpha)
Encode the image in a specific format. |
static void |
writeBufferedImage(java.awt.image.BufferedImage image,
java.lang.String format,
java.io.OutputStream outputStream)
Encode the image in a specific format and write it to an OutputStream. |
static void |
writeBufferedImage(java.awt.image.BufferedImage image,
java.lang.String format,
java.io.OutputStream outputStream,
boolean encodeAlpha)
Encode the image in a specific format and write it to an OutputStream. |
static void |
writeBufferedImage(java.awt.image.BufferedImage image,
java.lang.String format,
java.io.OutputStream outputStream,
float quality)
Encode the image in a specific format and write it to an OutputStream. |
static void |
writeBufferedImage(java.awt.image.BufferedImage image,
java.lang.String format,
java.io.OutputStream outputStream,
float quality,
boolean encodeAlpha)
Encode the image in a specific format and write it to an OutputStream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EncoderUtil()
Method Detail |
---|
public static byte[] encode(java.awt.image.BufferedImage image, java.lang.String format) throws java.io.IOException
image
- The image to be encoded.format
- The ImageFormat
to use.
java.io.IOException
public static byte[] encode(java.awt.image.BufferedImage image, java.lang.String format, boolean encodeAlpha) throws java.io.IOException
image
- The image to be encoded.format
- The ImageFormat
to use.encodeAlpha
- Whether to encode alpha transparency (not supported
by all ImageEncoders).
java.io.IOException
public static byte[] encode(java.awt.image.BufferedImage image, java.lang.String format, float quality) throws java.io.IOException
image
- The image to be encoded.format
- The ImageFormat
to use.quality
- The quality to use for the image encoding (not supported
by all ImageEncoders).
java.io.IOException
public static byte[] encode(java.awt.image.BufferedImage image, java.lang.String format, float quality, boolean encodeAlpha) throws java.io.IOException
image
- The image to be encoded.format
- The ImageFormat
to use.quality
- The quality to use for the image encoding (not supported
by all ImageEncoders).encodeAlpha
- Whether to encode alpha transparency (not supported
by all ImageEncoders).
java.io.IOException
public static void writeBufferedImage(java.awt.image.BufferedImage image, java.lang.String format, java.io.OutputStream outputStream) throws java.io.IOException
image
- The image to be encoded.format
- The ImageFormat
to use.outputStream
- The OutputStream to write the encoded image to.
java.io.IOException
public static void writeBufferedImage(java.awt.image.BufferedImage image, java.lang.String format, java.io.OutputStream outputStream, float quality) throws java.io.IOException
image
- The image to be encoded.format
- The ImageFormat
to use.outputStream
- The OutputStream to write the encoded image to.quality
- The quality to use for the image encoding (not
supported by all ImageEncoders).
java.io.IOException
public static void writeBufferedImage(java.awt.image.BufferedImage image, java.lang.String format, java.io.OutputStream outputStream, boolean encodeAlpha) throws java.io.IOException
image
- The image to be encoded.format
- The ImageFormat
to use.outputStream
- The OutputStream to write the encoded image to.encodeAlpha
- Whether to encode alpha transparency (not
supported by all ImageEncoders).
java.io.IOException
public static void writeBufferedImage(java.awt.image.BufferedImage image, java.lang.String format, java.io.OutputStream outputStream, float quality, boolean encodeAlpha) throws java.io.IOException
image
- The image to be encoded.format
- The ImageFormat
to use.outputStream
- The OutputStream to write the encoded image to.quality
- The quality to use for the image encoding (not
supported by all ImageEncoders).encodeAlpha
- Whether to encode alpha transparency (not supported
by all ImageEncoders).
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |