png-chunks-extractor

2.0.0 • Public • Published

Basic PNG chunks extractor

NPM Version

Installation

png-chunks-extractor is a Node.js module. It is available as a npm package.

npm i png-chunks-extractor

Example

The package supports both ESM import and CJS require.

import chunksExtractor from 'png-chunks-extractor';

const {chunks, chunksByType} = await chunksExtractor('path/to/file');

chunks is an array of PNG chunks data and type.

{
  dataBuf: <Buffer 00 00 03 00 00 00 03 00 08 02 00 00 00>,
  type: 1229472850 // 'IHDR' decimal value
}

Documentation

chunksExtractor(PNGFile[, options])

Parses PNGFile and returns its chunks

Extended documentation

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i png-chunks-extractor

      Weekly Downloads

      2

      Version

      2.0.0

      License

      MPL-2.0

      Unpacked Size

      28.3 kB

      Total Files

      8

      Last publish

      Collaborators

      • mrwormy