如何在Android中两个位图,使gif图片 [英] how to make gif image by two bitmaps in android

查看:193
本文介绍了如何在Android中两个位图,使gif图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想让动画GIF图像由2位图图像,我会得到相机和希望邮寄的GIF图像。

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.

推荐答案

有本地库为的 http://jiggawatt.org/badc0de/android/index.html#gifflen

我写了一个小的本地库为Android做颜色量化(从2-256色)位图,并将结果保存为GIF动画帧(可以根据需要添加尽可能多的帧)。   你可以破解和斜线库code,如你所愿,以满足您的需求。所使用的颜色量化是安东尼·德克尔的NeuQuant,有一些修改我所提出。

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.

对于基于Java库尝试的 http://www.jappit.com/blog/2008/12/04/j2me-animated-gif-en$c$cr/

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

用法非常简单,它需要以下步骤:       实例化AnimatedGifEn codeR对象       启动它,通过传递一个OutputStream作为参数(例如:一个ByteArrayOutputStream)       通过使用ADDFRAME()方法添加您的Image对象       通过调用完成定稿()

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

这篇关于如何在Android中两个位图,使gif图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆