|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.image.AbstractEncoder
lt.monarch.image.gif.GIFEncoder
public class GIFEncoder extends AbstractEncoder
GIFEncoder create a GIF file with or without LZW algorithm.
| Modifier and Type | Field and Description |
|---|---|
static int |
COLOR_PALETTE_ADAPTIVE_OCTREE
Indicates that gif color palette will be created using adaptive Octree-based quantization algorithm. |
static int |
COLOR_PALETTE_EXACT
Indicates color palette that contains the exact colors used in the graphic. |
static int |
COLOR_PALETTE_WEB
Indicates web-save color palette (216 colors). |
| Fields inherited from class lt.monarch.image.AbstractEncoder |
|---|
image |
| Constructor and Description |
|---|
GIFEncoder()
Constructor for GIFEncoder. |
| Modifier and Type | Method and Description |
|---|---|
void |
encode(java.awt.Image _image,
java.io.OutputStream outputStream)
Encodes image to the output stream. |
int |
getColorPalette()
Returns value indicating color palette used in gif compression. |
java.lang.String |
getContentType()
Returns content type string - 'gif' |
void |
setColorPalette(int palette)
Sets color palette used for gif compression. |
void |
setLZW(boolean useLZW)
Used to indicate whether of not we are using LZW algorithm. |
void |
setTransparent(boolean useTransparent)
Used to indicate background is transparent or not. |
| Methods inherited from class lt.monarch.image.AbstractEncoder |
|---|
readObject, writeObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int COLOR_PALETTE_WEB
public static final int COLOR_PALETTE_EXACT
public static final int COLOR_PALETTE_ADAPTIVE_OCTREE
| Constructor Detail |
|---|
public GIFEncoder()
| Method Detail |
|---|
public java.lang.String getContentType()
getContentType in class AbstractEncoderpublic void setTransparent(boolean useTransparent)
useTransparent - - True if background is transparent.public void setLZW(boolean useLZW)
useLZW - - True if LZW algorithm will be used.public void setColorPalette(int palette)
palette - one of these values:
GIFEncoder.COLOR_PALETTE_WEB,
GIFEncoder.COLOR_PALETTE_EXACT,
GIFEncoder.COLOR_PALETTE_ADAPTIVE_OCTREEpublic int getColorPalette()
public void encode(java.awt.Image _image,
java.io.OutputStream outputStream)
throws java.io.IOException,
java.lang.InterruptedException
encode in class AbstractEncoder_image - image which must be encoded to GIF format.outputStream - GIF encoded image output stream.java.io.IOException - if an I/O error occurs. In particular, an IOException
may be thrown if the output stream has been closed.java.lang.InterruptedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||