Name: BurstLinker
Owner: bilibili
Description: A simple C++ GIF encode library.
Created: 2018-02-03 14:45:07.0
Updated: 2018-05-21 03:05:04.0
Pushed: 2018-04-27 05:58:06.0
Size: 2314
Language: C++
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Idea from: square/gifencoder
BurstLinker is a simple C++ GIF encode library.
Gradle:
ementation 'com.bilibili:burst-linker:latest-version'
Android Studio 3.0.1
NDK r16
delayMs = 1000;
ng filePath = getCacheDir() + File.separator + "out.gif";
tLinker burstLinker = new BurstLinker();
{
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);
}
tch (GifEncodeException e) {
e.printStackTrace();
nally {
burstLinker.release();
This is an untested experimental feature
/feature/render-script
Install CMake
Mac brew install cmake
ArchLinux sudo pacman -S cmake
Build
cd /BurstLinker
mkdir cmake-build-debug; cd cmake-build-debug
cmake ..
make BurstLinker
Run
./BurstLinker 1000 1.jpg 2.jpg 3.jpg
See out.gif
Install Microsoft Visual Studio & CMake
Build
cd /BurstLinker
mkdir cmake-build-debug; cd cmake-build-debug
cmake ..
Open BurstLinker.sln
Solution Explorer -> BurstLinker -> Build
Run
cd Debug
BurstLinker.exe 1000 1.jpg 2.jpg 3.jpg
See out.gif
right 2018 Bilibili
nsed under the Apache License, Version 2.0 (the "License");
may not use this file except in compliance with the License.
may obtain a copy of the License at
ttp://www.apache.org/licenses/LICENSE-2.0
ss required by applicable law or agreed to in writing, software
ributed under the License is distributed on an "AS IS" BASIS,
OUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
the License for the specific language governing permissions and
tations under the License.