org.jfree.chart.encoders
public class SunJPEGEncoderAdapter extends Object implements ImageEncoder
Constructor Summary | |
---|---|
SunJPEGEncoderAdapter()
Creates a new SunJPEGEncoderAdapter instance. |
Method Summary | |
---|---|
byte[] | encode(BufferedImage bufferedImage)
Encodes an image in JPEG format.
|
void | encode(BufferedImage bufferedImage, OutputStream outputStream)
Encodes an image in JPEG format and writes it to an output stream.
|
float | getQuality()
Returns the quality of the image encoding, which is a number in the
range 0.0f to 1.0f (higher values give better quality output, but larger
file sizes). |
boolean | isEncodingAlpha()
Returns false always, indicating that this encoder does not
encode alpha transparency.
|
void | setEncodingAlpha(boolean encodingAlpha)
Set whether the encoder should encode alpha transparency (this is not
supported for JPEG, so this method does nothing).
|
void | setQuality(float quality)
Set the quality of the image encoding.
|
SunJPEGEncoderAdapter
instance.Parameters: bufferedImage the image to be encoded (null
not
permitted).
Returns: The byte[] that is the encoded image.
Throws: IOException if there is an I/O problem. NullPointerException if bufferedImage
is
null
.
Parameters: bufferedImage the image to be encoded (null
not
permitted). outputStream the OutputStream to write the encoded image to
(null
not permitted).
Throws: IOException if there is an I/O problem. NullPointerException if bufferedImage
is
null
.
Returns: A float representing the quality, in the range 0.0f to 1.0f.
See Also: SunJPEGEncoderAdapter
false
always, indicating that this encoder does not
encode alpha transparency.
Returns: false
.
Parameters: encodingAlpha ignored.
Parameters: quality A float representing the quality (in the range 0.0f to 1.0f).
See Also: getQuality