# gif-decoding

> Decoding a frame in gif file.

Latest version **0.0.1** (published 2020-12-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install gif-decoding
pnpm add gif-decoding
yarn add gif-decoding
bun add gif-decoding
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-12-01 |
| First published | 2020-12-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 2 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | even. |
| Maintainers | even. |
| Keywords | gif, decode, array, items |

## Links

- npm: https://www.npmjs.com/package/gif-decoding
- npm.io page: https://npm.io/package/gif-decoding

## Dependencies (2)

- [omggif](https://npm.io/package/omggif.md) ^1.0.10
- [array-range](https://npm.io/package/array-range.md) ^1.0.1

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2020-12-01

## README

# gif-decoding

## Install

```sh
npm install gif-decoding
```

## Usage

```js
const fs = require("fs");
const decodeGif = require("gif-decoding");

decodeGif(fs.readFileSync("test.gif"));
/*
{
  width: 220,
  height: 165,
  frames: [
    { timeCode: 0, data: [Uint8ClampedArray] },
	{ timeCode: 10, data: [Uint8ClampedArray] },
	...
  ]
}
*/
```

## API

### gifDecoding(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`.

---
_Source: https://npm.io/package/gif-decoding · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
