public class PNGEncoder extends java.lang.Object implements ImageEncoder
Constructor and Description |
---|
PNGEncoder() |
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()
Always return 1.0 since no quality degrade.
|
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()
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-2018 Potix Corporation. All Rights Reserved.