public interface ImageEncoder
| Modifier and Type | Method and Description |
|---|---|
byte[] |
encode(BufferedImage bufferedImage)
Encodes an image in a particular format.
|
void |
encode(BufferedImage bufferedImage,
OutputStream outputStream)
Encodes an image in a particular format and writes it to an OutputStream.
|
float |
getQuality()
Get the quality of the image encoding.
|
boolean |
isEncodingAlpha()
Get whether the encoder should encode alpha transparency.
|
void |
setEncodingAlpha(boolean encodingAlpha)
Set whether the encoder should encode alpha transparency (not
supported by all ImageEncoders).
|
void |
setQuality(float quality)
Set the quality of the image encoding (not supported by all
ImageEncoders).
|
byte[] encode(BufferedImage bufferedImage) throws IOException
bufferedImage - The image to be encoded.IOException - if there is an IO problem.void encode(BufferedImage bufferedImage, OutputStream outputStream) throws IOException
bufferedImage - The image to be encoded.outputStream - The OutputStream to write the encoded image to.IOException - if there is an IO problem.float getQuality()
void setQuality(float quality)
quality - A float representing the quality.boolean isEncodingAlpha()
void setEncodingAlpha(boolean encodingAlpha)
encodingAlpha - Whether the encoder should encode alpha
transparency.Copyright © 2001–2014 JFree.org. All rights reserved.