# png-chunks-extract

> Extract the data chunks from a PNG file

Latest version **1.0.0** (published 2015-10-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install png-chunks-extract
pnpm add png-chunks-extract
yarn add png-chunks-extract
bun add png-chunks-extract
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-10-04 |
| First published | 2015-10-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/png-chunks-extract) |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 35 |
| Author | Hugh Kennedy |
| Maintainers | hughsk |
| Keywords | png,, parse,, extract,, chunks,, metadata,, IHDR,, image,, hide,, text,, IEND,, format,, read |

## Links

- npm: https://www.npmjs.com/package/png-chunks-extract
- Repository: https://github.com/hughsk/png-chunks-extract
- Issues: https://github.com/hughsk/png-chunks-extract/issues
- npm.io page: https://npm.io/package/png-chunks-extract

## Dependencies (1)

- [crc-32](https://npm.io/package/crc-32.md) ^0.3.0

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-10-04

## README

# png-chunks-extract

[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)

Extract the data chunks from a PNG file.

Useful for reading the metadata of a PNG image, or as the base of a more complete PNG parser.

## Usage

[![NPM](https://nodei.co/npm/png-chunks-extract.png)](https://www.npmjs.com/package/png-chunks-extract)

### `chunks = extract(data)`

Takes the raw image file `data` as a `Uint8Array` or Node.js `Buffer`, and returns an array of chunks. Each chunk has a name and data buffer:

``` javascript
[
  { name: 'IHDR', data: Uint8Array([...]) },
  { name: 'IDAT', data: Uint8Array([...]) },
  { name: 'IDAT', data: Uint8Array([...]) },
  { name: 'IDAT', data: Uint8Array([...]) },
  { name: 'IDAT', data: Uint8Array([...]) },
  { name: 'IEND', data: Uint8Array([]) }
]
```

## License

MIT, see [LICENSE.md](http://github.com/hughsk/png-chunks-extract/blob/master/LICENSE.md) for details.

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