Skip to content

dragon66/animated-gif-writer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#AnimatedGIFWriter Standalone animated GIF writer.

How to use:

// True for dither. Will use more memory and CPU
AnimatedGIFWriter writer = new AnimatedGIFWriter(true);
OutputStream os = new FileOutputStream("animated.gif");
// Grab the BufferedImage whatever way you can
BufferedImage frame;
// Use -1 for both logical screen width and height to use the first frame dimension
writer.prepareForWrite(os, -1, -1)
writer.writeFrame(os, frame);
// Keep adding frame here
writer.finishWrite(os);
// And you are done!!!

If used as a normal GIF writer:

AnimatedGIFWriter writer = new AnimatedGIFWriter(true); // True for dither. Will need more memory and CPU
OutputStream os = new FileOutputStream("output.gif");
BufferedImage frame; // Grab the BufferedImage whatever way you can
writer.write(frame, os);
// And you are done!!!

About

Standalone Animated GIF Writer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages