|
Header
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jfree.chart.encoders.SunJPEGEncoderAdapter
public class SunJPEGEncoderAdapter
Adapter class for the Sun JPEG 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 JRE 1.4+.
Constructor Summary | |
---|---|
SunJPEGEncoderAdapter()
Creates a new SunJPEGEncoderAdapter instance. |
Method Summary | |
---|---|
byte[] |
encode(java.awt.image.BufferedImage bufferedImage)
Encodes an image in JPEG format. |
void |
encode(java.awt.image.BufferedImage bufferedImage,
java.io.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SunJPEGEncoderAdapter()
SunJPEGEncoderAdapter
instance.
Method Detail |
---|
public float getQuality()
getQuality
in interface ImageEncoder
setQuality(float)
public void setQuality(float quality)
setQuality
in interface ImageEncoder
quality
- A float representing the quality (in the range 0.0f to
1.0f).getQuality()
public boolean isEncodingAlpha()
false
always, indicating that this encoder does not
encode alpha transparency.
isEncodingAlpha
in interface ImageEncoder
false
.public void setEncodingAlpha(boolean encodingAlpha)
setEncodingAlpha
in interface ImageEncoder
encodingAlpha
- ignored.public byte[] encode(java.awt.image.BufferedImage bufferedImage) throws java.io.IOException
encode
in interface ImageEncoder
bufferedImage
- the image to be encoded (null
not
permitted).
java.io.IOException
- if there is an I/O problem.
java.lang.NullPointerException
- if bufferedImage
is
null
.public void encode(java.awt.image.BufferedImage bufferedImage, java.io.OutputStream outputStream) throws java.io.IOException
encode
in interface ImageEncoder
bufferedImage
- the image to be encoded (null
not
permitted).outputStream
- the OutputStream to write the encoded image to
(null
not permitted).
java.io.IOException
- if there is an I/O problem.
java.lang.NullPointerException
- if bufferedImage
is
null
.
|
Footer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |