public class SunPNGEncoderAdapter extends Object implements ImageEncoder
Constructor and Description |
---|
SunPNGEncoderAdapter() |
Modifier and Type | Method and Description |
---|---|
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).
|
public float getQuality()
getQuality
in interface ImageEncoder
public void setQuality(float quality)
setQuality
in interface ImageEncoder
quality
- A float representing the quality.public boolean isEncodingAlpha()
isEncodingAlpha
in interface ImageEncoder
public void setEncodingAlpha(boolean encodingAlpha)
setEncodingAlpha
in interface ImageEncoder
encodingAlpha
- Whether the encoder should encode alpha
transparency.public byte[] encode(BufferedImage bufferedImage) throws IOException
encode
in interface ImageEncoder
bufferedImage
- The image to be encoded.IOException
- if there is an IO problem.public void encode(BufferedImage bufferedImage, OutputStream outputStream) throws IOException
encode
in interface ImageEncoder
bufferedImage
- The image to be encoded.outputStream
- The OutputStream to write the encoded image to.IOException
- if there is an IO problem.Jas4pp 1.5 © Java Analysis Studio for Particle Physics