Iphone_bharat
Iphone_bharat

Reputation: 1159

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.

Upvotes: 5

Views: 5149

Answers (1)

ingsaurabh
ingsaurabh

Reputation: 15267

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()

Upvotes: 4

Related Questions