Class Overview
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+.
Summary
Public Methods |
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).
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.jfree.chart.encoders.ImageEncoder
abstract
byte[]
|
encode(BufferedImage bufferedImage)
Encodes an image in a particular format.
|
abstract
void
|
encode(BufferedImage bufferedImage, OutputStream outputStream)
Encodes an image in a particular format and writes it to an OutputStream.
|
abstract
float
|
getQuality()
Get the quality of the image encoding.
|
abstract
boolean
|
isEncodingAlpha()
Get whether the encoder should encode alpha transparency.
|
abstract
void
|
setEncodingAlpha(boolean encodingAlpha)
Set whether the encoder should encode alpha transparency (not
supported by all ImageEncoders).
|
abstract
void
|
setQuality(float quality)
Set the quality of the image encoding (not supported by all
ImageEncoders).
|
|
Public Constructors
public
SunPNGEncoderAdapter
()
Public Methods
public
byte[]
encode
(BufferedImage bufferedImage)
Encodes an image in PNG format.
Parameters
bufferedImage
| The image to be encoded. |
Returns
- The byte[] that is the encoded image.
Encodes an image in PNG format and writes it to an OutputStream.
Parameters
bufferedImage
| The image to be encoded. |
outputStream
| The OutputStream to write the encoded image to. |
public
float
getQuality
()
Get the quality of the image encoding (always 0.0).
Returns
- A float representing the quality.
public
boolean
isEncodingAlpha
()
Get whether the encoder should encode alpha transparency (always false).
Returns
- Whether the encoder is encoding alpha transparency.
public
void
setEncodingAlpha
(boolean encodingAlpha)
Set whether the encoder should encode alpha transparency (not
supported in this ImageEncoder).
Parameters
encodingAlpha
| Whether the encoder should encode alpha
transparency.
|
public
void
setQuality
(float quality)
Set the quality of the image encoding (not supported in this
ImageEncoder).
Parameters
quality
| A float representing the quality.
|