gpt4 book ai didi

android - 如何在android中通过两个位图制作gif图像

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:49:18 24 4
gpt4 key购买 nike

我只想从我将从相机获得的 2 个位图图像制作动画 gif 图像,并想邮寄该 gif 图像。

最佳答案

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.

对于基于 Java 的库,请尝试 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()

关于android - 如何在android中通过两个位图制作gif图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8515350/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com