1.2.2 • Published 3 years ago

gif-decoder v1.2.2

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

gif-decoder

Install

npm install gif-decoder

Usage

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

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

API

gifDecoder(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.

1.2.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.2.2

3 years ago

1.1.3

3 years ago

1.2.1

3 years ago

1.1.2

3 years ago

0.0.0

3 years ago

0.0.2

5 years ago

0.0.1

5 years ago