|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object echopoint.image.PngEncoder
PngEncoder
implements the ImageEncoder
interface
and hence can take a java.awt.Image object and encode it as a PNG
output stream.
The Image can have a DirectColorModel
or an IndexColorModel
.
NOTE : While the Echo framework has a PNG encoder built in to it, it currently does not handle transparency correctly. Therefore this encoder has been provided.
Constructor Summary | |
PngEncoder()
Constructs a PngEncoder ready to start encoding, with the Alpha channel being encoded. |
Method Summary | |
void |
encode(java.awt.Image image,
java.io.OutputStream out)
|
java.lang.String |
getContentType()
|
boolean |
isEncodeAlpha()
This returns true if the Alpha channel of the image will be encoded |
void |
setEncodeAlpha(boolean b)
If this is set to true then the Alpha channel of the image will be encoded. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PngEncoder()
Method Detail |
public void encode(java.awt.Image image, java.io.OutputStream out) throws java.io.IOException
encode
in interface ImageEncoder
java.io.IOException
ImageEncoder.encode(java.awt.Image, java.io.OutputStream)
public java.lang.String getContentType()
getContentType
in interface ImageEncoder
ImageEncoder.getContentType()
public boolean isEncodeAlpha()
public void setEncodeAlpha(boolean b)
b
- - true if the Alpha channel of the image is to be encoded
|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |