# pixel-gif

> Parse Gif to ImageData in cross-platform

Latest version **0.0.1** (published 2015-11-01) · MIT license · 0 weekly downloads

## Install

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

## 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 | 2015-11-01 |
| First published | 2015-05-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 59naga |
| Maintainers | 59naga |
| Keywords | pixel, gif |

## Links

- npm: https://www.npmjs.com/package/pixel-gif
- Repository: https://github.com/59naga/pixel-gif-
- Homepage: https://github.com/59naga/pixel-gif-#readme
- Issues: https://github.com/59naga/pixel-gif-/issues
- npm.io page: https://npm.io/package/pixel-gif

## Dependencies (2)

- [omggif](https://npm.io/package/omggif.md) ^1.0.8
- [pixel-util](https://npm.io/package/pixel-util.md) ^0.0.2

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2015-11-01
- 0.0.0 — 2015-11-01
- 0.0.0-alpha.1 — 2015-06-02
- 0.0.0-alpha.0 — 2015-05-31

## README

# PixelGif [![NPM version][npm-image]][npm] [![Build Status][travis-image]][travis] [![Coverage Status][coveralls-image]][coveralls]

[![Sauce Test Status][sauce-image]][sauce]

> Parse Gif to ImageData in cross-platform.

## Installation
```bash
$ npm install pixel-gif --save
```
```js
var pixelGif= require('pixel-gif');
console.log(pixelGif); //object
```

# API

## pixelGif.parse(`file`) -> promise.then(`images`)

return `images` is Array contains one or more `ImageData`.
> Return the `object` instead of `ImageData` at Node.js

```js
var file= 'https://59naga.github.io/fixtures/animated.GIF';

pixelGif.parse(file).then(function(images){
  var i= 0;

  console.log(images.loopCount); // 0(Infinite)

  var nextImage= function(){
    var imageData= images[i++];
    if(imageData==null) return;

    console.log(imageData);
    nextImage();
  }

  nextImage();
});
// { width: 73, height: 73, x: 0, y: 0, has_local_palette: false, palette_offset: 13, data_offset: 818, data_length: 393, transparent_index: null, interlaced: false, delay: 1000, disposal: 0, data: <Uint8Array ..> }
// { width: 73, height: 73, x: 0, y: 0, has_local_palette: false, palette_offset: 13, data_offset: 1229, data_length: 387, transparent_index: null, interlaced: false, delay: 900, disposal: 0, data: <Uint8Array ..>  }
// { width: 73, height: 73, x: 0, y: 0, has_local_palette: false, palette_offset: 13, data_offset: 1634, data_length: 393, transparent_index: null, interlaced: false, delay: 800, disposal: 0, data: <Uint8Array ..>  }
// ...
```

# See
* [pixel](https://github.com/59naga/pixel/)
* [pixel-util](https://github.com/59naga/pixel-util/)
* __pixel-gif__
* [pixel-png](https://github.com/59naga/pixel-png/)
* [pixel-jpg](https://github.com/59naga/pixel-jpg/)
* [pixel-bmp](https://github.com/59naga/pixel-bmp/)

License
---
[MIT][License]

[License]: http://59naga.mit-license.org/

[sauce-image]: http://soysauce.berabou.me/u/59798/pixel-gif.svg?large
[sauce]: https://saucelabs.com/u/59798
[npm-image]:https://img.shields.io/npm/v/pixel-gif.svg?style=flat-square
[npm]: https://npmjs.org/package/pixel-gif
[travis-image]: http://img.shields.io/travis/59naga/pixel-gif-.svg?style=flat-square
[travis]: https://travis-ci.org/59naga/pixel-gif-
[coveralls-image]: http://img.shields.io/coveralls/59naga/pixel-gif-.svg?style=flat-square
[coveralls]: https://coveralls.io/r/59naga/pixel-gif-?branch=master

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