Skip to content

dragon66/android-gif-animated-writer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnimatedGIFWriter

Standalone Android animated GIF writer.

How to use:

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

If used as normal GIF writer:

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

About

Standalone Android Animated GIF Writer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages