|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.co.silentsoftware.core.converters.video.GifConverter
public class GifConverter
Wrapper around third party GifSequenceWriter class. Note due to that third party API design unlike other converters this converter holds a state and thus must be initialised via (createSequenceWriter) and reset (createGif is intended to be the final call). Note this class is NOT thread safe!
| Field Summary | |
|---|---|
private java.io.ByteArrayOutputStream |
baos
Byte array required to save the created gif |
private GifSequenceWriter |
writer
The Gif sequence writer |
| Constructor Summary | |
|---|---|
GifConverter()
|
|
| Method Summary | |
|---|---|
void |
addFrame(java.awt.image.BufferedImage source)
Adds a single buffered image to the gif being created. |
byte[] |
createGif()
Create the gif and clear down afterwards (1 shot method). |
void |
createSequence(java.awt.image.BufferedImage buf,
int gifDisplayTimeMills,
boolean loop)
Create a new gif sequence - note this is not a thread safe method! |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private GifSequenceWriter writer
private java.io.ByteArrayOutputStream baos
| Constructor Detail |
|---|
public GifConverter()
| Method Detail |
|---|
public byte[] createGif()
throws java.io.IOException
java.io.IOException
public void addFrame(java.awt.image.BufferedImage source)
throws java.io.IOException
source -
java.io.IOException
public void createSequence(java.awt.image.BufferedImage buf,
int gifDisplayTimeMills,
boolean loop)
throws javax.imageio.IIOException,
java.io.IOException
gifDisplayTimeMills - loop -
javax.imageio.IIOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||