Skip to content

✂️javascript version for gifsicle(gif压缩的纯js版本)

Notifications You must be signed in to change notification settings

zx6733090/gifmin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

gifmin

Minify gif images seamlessly. Ported gifsicle using emscripten. This project is inspired by opencore-amr-js.

Usage

var gifBuffer=new ArrayBuffer(10);
var colors=32;

var result=gifmin(gifBuffer,colors);
//console.log(result)
//=>ArrayBuffer or false

API

gifmin(gifBuffer,colors)

Parameters

gifBuffer

Type: ArrayBuffer

Gif Buffer to be optimized.

colors

Type: number

Reduce the number of distinct colors in each output GIF to num or less. Num must be between 2 and 256.


Return value

If the function succeeds, the return value is a promise for a buffer. If the function fails, the return value is false.

Remarks

emscripten command: emcc -O1 *.cpp -o gif.js

About

✂️javascript version for gifsicle(gif压缩的纯js版本)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published