| java.lang.Object nextapp.echo2.webcontainer.image.PngEncoder
Inner Class :public interface Filter | |
Inner Class :interface Translator | |
Constructor Summary | |
public | PngEncoder(Image image, boolean encodeAlpha, Filter filter, int compressionLevel) Creates a PNG encoder for an image.
Parameters: image - the image to be encoded Parameters: encodeAlpha - true if the image's alpha channel should be encoded Parameters: filter - The filter to be applied to the image data, one of the following values:- SUB_FILTER
- UP_FILTER
- AVERAGE_FILTER
- PAETH_FILTER
If a null value is specified, no filtering will be performed. Parameters: compressionLevel - the deflater compression level that will be usedfor compressing the image data: Valid values range from 0 to 9.Higher values result in smaller files and therefore decreasenetwork traffic, but require more CPU time to encode. |
AVERAGE_FILTER | final public static Filter AVERAGE_FILTER(Code) | | |
PAETH_FILTER | final public static Filter PAETH_FILTER(Code) | | |
SUB_FILTER | final public static Filter SUB_FILTER(Code) | | |
UP_FILTER | final public static Filter UP_FILTER(Code) | | |
PngEncoder | public PngEncoder(Image image, boolean encodeAlpha, Filter filter, int compressionLevel)(Code) | | Creates a PNG encoder for an image.
Parameters: image - the image to be encoded Parameters: encodeAlpha - true if the image's alpha channel should be encoded Parameters: filter - The filter to be applied to the image data, one of the following values:- SUB_FILTER
- UP_FILTER
- AVERAGE_FILTER
- PAETH_FILTER
If a null value is specified, no filtering will be performed. Parameters: compressionLevel - the deflater compression level that will be usedfor compressing the image data: Valid values range from 0 to 9.Higher values result in smaller files and therefore decreasenetwork traffic, but require more CPU time to encode. The normalcompromise value is 3. |
encode | public synchronized void encode(OutputStream out) throws IOException(Code) | | Encodes the image.
Parameters: out - an OutputStream to which the encoded image will bewritten throws: IOException - if a problem is encountered writing the output |
|
|