org.jfree.chart.encoders
Class SunPNGEncoderAdapter
java.lang.Object
org.jfree.chart.encoders.SunPNGEncoderAdapter
- ImageEncoder
Adapter class for the Sun PNG Encoder. The ImageEncoderFactory will only
return a reference to this class by default if the library has been compiled
under a JDK 1.4+ and is being run using a JDK 1.4+.
byte[] | encode(BufferedImage bufferedImage) - Encodes an image in PNG format.
|
void | encode(BufferedImage bufferedImage, OutputStream outputStream) - Encodes an image in PNG format and writes it to an OutputStream.
|
float | getQuality() - Get the quality of the image encoding (always 0.0).
|
boolean | isEncodingAlpha() - Get whether the encoder should encode alpha transparency (always false).
|
void | setEncodingAlpha(boolean encodingAlpha) - Set whether the encoder should encode alpha transparency (not
supported in this ImageEncoder).
|
void | setQuality(float quality) - Set the quality of the image encoding (not supported in this
ImageEncoder).
|
encode
public byte[] encode(BufferedImage bufferedImage)
throws IOException
Encodes an image in PNG format.
- encode in interface ImageEncoder
bufferedImage
- The image to be encoded.
- The byte[] that is the encoded image.
encode
public void encode(BufferedImage bufferedImage,
OutputStream outputStream)
throws IOException
Encodes an image in PNG format and writes it to an OutputStream.
- encode in interface ImageEncoder
bufferedImage
- The image to be encoded.outputStream
- The OutputStream to write the encoded image to.
isEncodingAlpha
public boolean isEncodingAlpha()
Get whether the encoder should encode alpha transparency (always false).
- isEncodingAlpha in interface ImageEncoder
- Whether the encoder is encoding alpha transparency.
setEncodingAlpha
public void setEncodingAlpha(boolean encodingAlpha)
Set whether the encoder should encode alpha transparency (not
supported in this ImageEncoder).
- setEncodingAlpha in interface ImageEncoder
encodingAlpha
- Whether the encoder should encode alpha
transparency.
setQuality
public void setQuality(float quality)
Set the quality of the image encoding (not supported in this
ImageEncoder).
- setQuality in interface ImageEncoder
quality
- A float representing the quality.