public class JPEGEncoder extends java.lang.Object implements ImageEncoder
Constructor and Description |
---|
JPEGEncoder() |
Modifier and Type | Method and Description |
---|---|
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.
|
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
Copyright © 2005-2021 Potix Corporation. All Rights Reserved.