node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org »

gifsickle

gifsickle

a node wrapper for gifsicle and gifsicle-bin.

specifically useful for setting delays for individual frames.

install

npm install gifsickle

usage

var gifsickle = require('gifsickle');
var frames = require('glob').sync('*.gif').map(function(path) {
  return { path: path }
});
 
// set the delay of 0.5s to first frame 
frames[0].delay = 50;
 
gifsickle('foo.gif', [
  frames: frames,
  delay: 15,
}, function() {
  console.log('gif is ready');
});