|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Interface for abstracting different types of image encoders.
| Method Summary | |
byte[] |
encode(java.awt.image.BufferedImage bufferedImage)
Encodes an image in a particular format. |
void |
encode(java.awt.image.BufferedImage bufferedImage,
java.io.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). |
| Method Detail |
public byte[] encode(java.awt.image.BufferedImage bufferedImage)
throws java.io.IOException
bufferedImage - The image to be encoded.
java.io.IOException
public void encode(java.awt.image.BufferedImage bufferedImage,
java.io.OutputStream outputStream)
throws java.io.IOException
bufferedImage - The image to be encoded.outputStream - The OutputStream to write the encoded image to.
java.io.IOExceptionpublic float getQuality()
public void setQuality(float quality)
quality - A float representing the quality.public boolean isEncodingAlpha()
public void setEncodingAlpha(boolean encodingAlpha)
encodingAlpha - Whether the encoder should encode alpha
transparency.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||