Socket
Socket
Sign inDemoInstall

gifsicle

Package Overview
Dependencies
3
Maintainers
3
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

gifsicle


Version published
Maintainers
3
Install size
4.27 MB
Created

Package description

What is gifsicle?

The gifsicle npm package is a Node.js wrapper for the Gifsicle command-line tool, which is used for manipulating GIF images. It allows you to optimize, resize, and edit GIFs programmatically.

What are gifsicle's main functionalities?

Optimize GIF

This feature allows you to optimize a GIF file to reduce its size. The code sample demonstrates how to use the gifsicle package to optimize an input GIF and save the optimized version as output.gif.

const gifsicle = require('gifsicle');
const execFile = require('child_process').execFile;

execFile(gifsicle, ['--optimize', '--output', 'output.gif', 'input.gif'], (err) => {
  if (err) throw err;
  console.log('GIF optimized');
});

Resize GIF

This feature allows you to resize a GIF to specified dimensions. The code sample demonstrates how to resize an input GIF to 200x200 pixels and save the resized version as output.gif.

const gifsicle = require('gifsicle');
const execFile = require('child_process').execFile;

execFile(gifsicle, ['--resize', '200x200', '--output', 'output.gif', 'input.gif'], (err) => {
  if (err) throw err;
  console.log('GIF resized');
});

Extract Frames

This feature allows you to extract individual frames from a GIF. The code sample demonstrates how to extract frames from an input GIF, which will be saved as separate files.

const gifsicle = require('gifsicle');
const execFile = require('child_process').execFile;

execFile(gifsicle, ['--explode', 'input.gif'], (err) => {
  if (err) throw err;
  console.log('Frames extracted');
});

Other packages similar to gifsicle

Readme

Source

gifsicle-bin Build Status

gifsicle manipulates GIF image files in many different ways. Depending on command line options, it can merge several GIFs into a GIF animation; explode an animation into its component frames; change individual frames in an animation; turn interlacing on and off; add transparency and much more.

Install

$ npm install --save gifsicle

Usage

var execFile = require('child_process').execFile;
var gifsicle = require('gifsicle');

execFile(gifsicle, ['-o', 'output.gif', 'input.gif'], function (err) {
	console.log('Image minified!');
});

CLI

$ npm install --global gifsicle
$ gifsicle --help

License

MIT © imagemin

Keywords

FAQs

Last updated on 13 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc