Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

decode-gif

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decode-gif

Decode the frames of a gif.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15K
decreased by-2.34%
Maintainers
1
Weekly downloads
 
Created
Source

decode-gif Travis CI Build Status

Decode the frames of a gif.

NPM Badge

Install

npm install decode-gif

Usage

const fs = require("fs");
const decodeGif = require("decode-gif");

decodeGif(fs.readFileSync("unicorn.gif"));
/*
{
  width: 220,
  height: 165,
  frames: [
    { timeCode: 0, data: [Uint8ClampedArray] },
	{ timeCode: 10, data: [Uint8ClampedArray] },
	...
  ]
}
*/

API

decodeGif(data)

data

Type: array-like

The gif data. Can be anything array-like such as a Buffer, Array or Uint8Array.

Return value
width

Type: number

The width of the gif.

height

Type: number

The height of the gif.

frames

An array of each frame of the gif.

frame.timeCode

The time code in milliseconds that the frame appears at.

frame.data

The frame data as a Uint8ClampedArray.

Keywords

FAQs

Package last updated on 17 Jul 2020

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc