C++ GIF 编码库 BurstLinker

码农软件 · 软件分类 · 常用工具包 · 2019-08-13 07:12:40

软件介绍

BurstLinker 是一个简单的 C ++ GIF 编码库。可以在 Android,Windows,Linux 或其他平台上轻松使用它。

安卓平台

下载:

Gradle:

implementation 'com.bilibili:burst-linker:latest-version'

构建环境

Android Studio 3.0.1

NDK r16

基本用法

int delayMs = 1000;
String filePath = getExternalCacheDir() + File.separator + "out.gif";
BurstLinker burstLinker = new BurstLinker();

try {
    burstLinker.init(width, height, filePath);
    Bitmap colorBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
    Canvas canvas = new Canvas(colorBitmap);
    Paint p = new Paint();
    int[] colors = new int[]{0xFFF00000, 0xFFFFFF00, 0xFFFFFFFF};
    for (int color : colors) {
        p.setColor(color);
        canvas.drawRect(0, 0, width, height, p);
        burstLinker.connect(colorBitmap, BurstLinker.OCTREE_QUANTIZER, 
                BurstLinker.NO_DITHER, 0, 0, delayMs);
    }
} catch (GifEncodeException e) {
    e.printStackTrace();
} finally {
    burstLinker.release();
}

本文地址:https://codercto.com/soft/d/12249.html

Hello World

Hello World

Hannah Fry / W. W. Norton Company / 2018-9 / GBP 17.99

A look inside the algorithms that are shaping our lives and the dilemmas they bring with them. If you were accused of a crime, who would you rather decide your sentence—a mathematically consistent ......一起来看看 《Hello World》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具