|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.image.encoder.JPEGEncoder
public class JPEGEncoder
The encoder for encoding an image into the JPEG format
Constructor Summary | |
---|---|
JPEGEncoder()
|
Method Summary | |
---|---|
byte[] |
encode(java.awt.image.RenderedImage image)
Encodes an AWT image into a byte array in a particular format. |
float |
getQuality()
Returns the quality of the image encoding. |
boolean |
isEncodingAlpha()
Returns whether to encode the alpha transparency. |
void |
setEncodingAlpha(boolean encodeAlpha)
Sets whether to encode the alpha transparency. |
void |
setQuality(float quality)
Sets 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 JPEGEncoder()
Method Detail |
---|
public byte[] encode(java.awt.image.RenderedImage image) throws java.io.IOException
ImageEncoder
encode
in interface ImageEncoder
java.io.IOException
public float getQuality()
Default: 0.95f.
getQuality
in interface ImageEncoder
public void setQuality(float quality)
ImageEncoder
setQuality
in interface ImageEncoder
public boolean isEncodingAlpha()
ImageEncoder
isEncodingAlpha
in interface ImageEncoder
public void setEncodingAlpha(boolean encodeAlpha)
ImageEncoder
setEncodingAlpha
in interface ImageEncoder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |