|
NextApp Echo3 v3.0.rc1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo.webcontainer.util.PngEncoder
public class PngEncoder
Encodes a java.awt.Image into PNG format. For more information on the PNG specification, see the W3C PNG page at http://www.w3.org/TR/REC-png.html.
| Nested Class Summary | |
|---|---|
static interface |
PngEncoder.Filter
An interface for PNG filters. |
| Field Summary | |
|---|---|
static PngEncoder.Filter |
AVERAGE_FILTER
AverageFilter singleton. |
static PngEncoder.Filter |
PAETH_FILTER
PaethFilter singleton. |
static PngEncoder.Filter |
SUB_FILTER
SubFilter singleton. |
static PngEncoder.Filter |
UP_FILTER
UpFilter singleton. |
| Constructor Summary | |
|---|---|
PngEncoder(java.awt.Image image,
boolean encodeAlpha,
PngEncoder.Filter filter,
int compressionLevel)
Creates a PNG encoder for an image. |
|
| Method Summary | |
|---|---|
void |
encode(java.io.OutputStream out)
Encodes the image. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final PngEncoder.Filter SUB_FILTER
SubFilter singleton.
public static final PngEncoder.Filter UP_FILTER
UpFilter singleton.
public static final PngEncoder.Filter AVERAGE_FILTER
AverageFilter singleton.
public static final PngEncoder.Filter PAETH_FILTER
PaethFilter singleton.
| Constructor Detail |
|---|
public PngEncoder(java.awt.Image image,
boolean encodeAlpha,
PngEncoder.Filter filter,
int compressionLevel)
image - the image to be encodedencodeAlpha - true if the image's alpha channel should be encodedfilter - The filter to be applied to the image data, one of the
following values:
compressionLevel - the deflater compression level that will be used
for compressing the image data: Valid values range from 0 to 9.
Higher values result in smaller files and therefore decrease
network traffic, but require more CPU time to encode. The normal
compromise value is 3.| Method Detail |
|---|
public void encode(java.io.OutputStream out)
throws java.io.IOException
out - an OutputStream to which the encoded image will be
written
java.io.IOException - if a problem is encountered writing the output
|
NextApp Echo3 v3.0.rc1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||