# pixel

> Parse file to ImageData in cross-platform

Latest version **0.1.3** (published 2018-07-24) · MIT license · 0 weekly downloads

## Install

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

## 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.1.3 |
| Published | 2018-07-24 |
| First published | 2015-05-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 1.8 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 59naga |
| Maintainers | 59naga |

## Links

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

## Dependencies (7)

- [pixel-bmp](https://npm.io/package/pixel-bmp.md) ^0.0.1
- [pixel-gif](https://npm.io/package/pixel-gif.md) ^0.0.1
- [pixel-jpg](https://npm.io/package/pixel-jpg.md) ^0.0.1
- [pixel-png](https://npm.io/package/pixel-png.md) ^0.0.1
- [pixel-util](https://npm.io/package/pixel-util.md) ^0.0.2
- [pixel-webp](https://npm.io/package/pixel-webp.md) ^0.0.0
- [conventional-github-releaser](https://npm.io/package/conventional-github-releaser.md) ^3.1.2

## Recent versions

- 0.1.3 (latest) — 2018-07-24
- 0.1.2 — 2018-07-24
- 0.1.1 — 2018-07-24
- 0.1.0 — 2018-07-24
- 0.0.4 — 2015-11-01
- 0.0.3 — 2015-11-01
- 0.0.1-alpha.2 — 2015-06-17
- 0.0.1-alpha.1 — 2015-06-17
- 0.0.1-alpha.0 — 2015-06-11
- 0.0.0 — 2015-06-08
- 0.0.0-beta.2 — 2015-06-02
- 0.0.0-beta.1 — 2015-06-01
- 0.0.0-beta.0 — 2015-05-27
- 0.0.0-alpha.9 — 2015-05-27
- 0.0.0-alpha.8 — 2015-05-27
- … 6 more at https://npm.io/package/pixel/versions

## README

Pixel
---
<p align="right">
  <a href="https://www.npmjs.com/package/pixel">
    <img alt="Npm version" src="https://badge.fury.io/js/pixel.svg">
  </a>
  <a href="https://travis-ci.org/59naga/pixel">
    <img alt="Build Status" src="https://travis-ci.org/59naga/pixel.svg?branch=master">
  </a>
</p>

> Get ImageData in cross-platform

Installation
---

## for NodeJS
```bash
$ yarn add pixel
# or
$ npm install pixel --save
```

## for Browser
```html
<script src="https://unpkg.com/pixel"></script>
<script>
  console.log(pixel); //function
</script>
```

API
---

## pixel(`file`) -> Promise<ImageData[]>

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

`file` is...
* string: url (e.g. `http[s]://...`)
* string: datauri (e.g. `data:image/...`)
* string: path (e.g. `/path/to/file`)
* string: binary (unless above)
* object: Blob/File
* object: Buffer/ArrayBuffer/Uint8Array/Uint8ClampedArray
* object: HTMLImageElement

## Support
* gif (static/animation)
* png (static/animation)
* jpeg
* bitmap (24bit or less)
* webp (static/animation)

Related projects
---
* [pixel-util](https://github.com/59naga/pixel-util/)
* [pixel-gif](https://github.com/59naga/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/)
* [pixel-webp](https://github.com/59naga/pixel-webp/)
* __pixel__
* [pixel-to-ansi](https://github.com/59naga/pixel-to-ansi/)
* [pixel-to-svg](https://github.com/59naga/pixel-to-svg/)

License
---
[MIT][License]

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

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