Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to make gif image by two bitmaps in android

I just want to make animated gif image from 2 bitmap images which i will get from camera and want to mail that gif image.

like image 700
Iphone_bharat Avatar asked Oct 10 '22 05:10

Iphone_bharat


1 Answers

There is native library for that http://jiggawatt.org/badc0de/android/index.html#gifflen

I've written a small native lib for Android to do color quantization (from 2-256 colors) of a Bitmap and save the result as a frame in an animated GIF (you can add as many frames as you like). You may hack and slash the library code as you wish to fit your needs. The color quantizer used is Anthony Dekker's NeuQuant, with some modifications made by me.

For a java based library try http://www.jappit.com/blog/2008/12/04/j2me-animated-gif-encoder/

Usage is quite straightforward, and it requires these steps: Instantiate your AnimatedGifEncoder object Start it, by passing an OutputStream as argument (e.g.: a ByteArrayOutputStream) Add your Image objects by using addFrame() method Finalize it by calling finish()

like image 92
ingsaurabh Avatar answered Oct 13 '22 11:10

ingsaurabh