|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ij.plugin.GifEncoder
class GifEncoder
Field Summary | |
---|---|
(package private) boolean |
closeStream
|
(package private) int |
colorDepth
|
(package private) byte[] |
colorTab
|
protected int |
delay
|
(package private) int |
dispose
|
(package private) boolean |
firstFrame
|
(package private) byte[] |
gct
|
(package private) int |
GCTbl
|
(package private) int |
GCTcindex
|
(package private) boolean |
GCTextracted
|
(package private) int |
GCTgrn
|
(package private) boolean |
GCTloadedExternal
|
(package private) boolean |
GCToverideColor
|
(package private) boolean |
GCToverideIndex
|
(package private) int |
GCTred
|
(package private) boolean |
GCTsetTransparent
|
(package private) int |
height
|
(package private) ImagePlus |
image
|
(package private) byte[] |
indexedPixels
|
(package private) int |
lctSize
|
(package private) java.io.OutputStream |
out
|
(package private) byte[] |
pixels
|
(package private) int |
repeat
|
(package private) int |
sample
|
(package private) boolean |
sizeSet
|
(package private) boolean |
started
|
(package private) int |
transIndex
|
(package private) boolean |
transparent
|
(package private) int |
width
|
Constructor Summary | |
---|---|
GifEncoder()
|
Method Summary | |
---|---|
boolean |
addFrame(ImagePlus image)
Adds next GIF frame. |
boolean |
finish()
Flushes any pending data and closes output file. |
void |
OverRideQuality(int npixs)
Sets Net sample size depending on image size |
(package private) void |
Process8bitCLT(ImagePlus image)
Gets Color lookup Table from 8 bit ImagePlus |
void |
setDelay(int ms)
Sets the delay time between each frame, or changes it for subsequent frames (applies to last frame added). |
void |
setDispose(int code)
Sets the GIF frame disposal code for the last added frame and any subsequent frames. |
void |
setFrameRate(float fps)
Sets frame rate in frames per second. |
void |
setQuality(int quality)
Sets quality of color quantization (conversion of images to the maximum 256 colors allowed by the GIF specification). |
void |
setRepeat(int iter)
Sets the number of times the set of GIF frames should be played. |
void |
setSize(int w,
int h)
Sets the GIF frame size. |
void |
setTransparent(boolean c)
Sets the transparent color for the last added frame and any subsequent frames. |
boolean |
start(java.io.OutputStream os)
Initiates GIF file creation on the given stream. |
boolean |
start(java.lang.String file)
Initiates writing of a GIF file with the specified name. |
protected void |
writeGraphicCtrlExt()
Writes Graphic Control Extension |
protected void |
writeImageDesc()
Writes Image Descriptor |
protected void |
writeLSD()
Writes Logical Screen Descriptor without global color table |
protected void |
writeLSDgct()
Writes Logical Screen Descriptor with global color table |
protected void |
writeNetscapeExt()
Writes Netscape application extension to define repeat count. |
protected void |
writePalette()
Writes color table |
protected void |
writePixels()
Encodes and writes pixel data |
protected void |
writeShort(int value)
Write 16-bit value to output stream, LSB first |
protected void |
writeString(java.lang.String s)
Writes string to output stream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
int width
int height
boolean transparent
int transIndex
int repeat
protected int delay
boolean started
java.io.OutputStream out
ImagePlus image
byte[] pixels
byte[] indexedPixels
int colorDepth
byte[] colorTab
int lctSize
int dispose
boolean closeStream
boolean firstFrame
boolean sizeSet
int sample
byte[] gct
boolean GCTextracted
boolean GCTloadedExternal
int GCTred
int GCTgrn
int GCTbl
int GCTcindex
boolean GCTsetTransparent
boolean GCToverideIndex
boolean GCToverideColor
Constructor Detail |
---|
GifEncoder()
Method Detail |
---|
public boolean addFrame(ImagePlus image)
finish()
flushes all
frames. If setSize
was not invoked, the size of the
first image is used for all subsequent frames.
im
- containing frame to write.
void Process8bitCLT(ImagePlus image)
public boolean finish()
public void setDelay(int ms)
ms
- int delay time in millisecondspublic void setDispose(int code)
code
- int disposal code.public void setFrameRate(float fps)
setDelay(1000/fps)
.
fps
- float frame rate (frames per second)public void setQuality(int quality)
quality
- int greater than 0.public void setRepeat(int iter)
iter
- int number of iterations.public void setSize(int w, int h)
w
- int frame width.h
- int frame width.public void setTransparent(boolean c)
c
- Color to be treated as transparent on display.public boolean start(java.io.OutputStream os)
os
- OutputStream on which GIF images are written.
public boolean start(java.lang.String file)
file
- String containing output file name.
public void OverRideQuality(int npixs)
protected void writeGraphicCtrlExt() throws java.io.IOException
java.io.IOException
protected void writeImageDesc() throws java.io.IOException
java.io.IOException
protected void writeLSDgct() throws java.io.IOException
java.io.IOException
protected void writeLSD() throws java.io.IOException
java.io.IOException
protected void writeNetscapeExt() throws java.io.IOException
java.io.IOException
protected void writePalette() throws java.io.IOException
java.io.IOException
protected void writePixels() throws java.io.IOException
java.io.IOException
protected void writeShort(int value) throws java.io.IOException
java.io.IOException
protected void writeString(java.lang.String s) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |