npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

apng-parser-js

v2.0.0

Published

A parser for APNG files.

Readme

APNG Parser

A simple parser for APNG (Animated Portable Network Graphics) files in Node.js.

Table of Contents

Installation

You can install the apng-parser-js package using npm:

npm install apng-parser-js

Usage

CommonJs:

const { readFileSync } = require('fs');
const apngParser = require('apng-parser-js');

Import:

import { readFileSync } from 'fs';
import apngParser from 'apng-parser-js';

Parse an APNG:

const buffer = readFileSync(filePath);
const apng = apngParser(buffer);

You can directly save the frames by using the APNG method saveFrames():

apng.saveFrames('path-to-your-folder');

Or save a specifc frame by using the Frame method save():

const frame = apng.frames[0];
frame.save('path-to-your-folder');

You can retrieve the raw pixel data by using the method .getRGBA

const frame = apng.frames[0];
const rgba = frame.getRGBA();

Example Response

APNG {
  width: 320,
  height: 320,
  bitDepth: 8,
  colorType: 3,
  compressionMethod: 0,
  filterMethod: 0,
  interlaceMethod: 0,
  palette: <Buffer 36 39 3f 00 00 00 38 33 45 d7 a4 8c 46 3e 44 02 02 02 c5 14 04 3c 36 49 cf 9f 68 3a 35 48 35 35 35 39 34 46 f1 c7 78 05 05 06 0a 09 0b 22 22 23 0d 0c ... 718 more bytes>,
  transparency: <Buffer 00>,
  frameCount: 11,
  loopCount: 0,
  frames: [
    Frame {
      width: 320,
      height: 320,
      left: 0,
      top: 0,
      delayNum: 3,
      delayDen: 100,
      disposeOp: 1,
      blendOp: 0,
      bitDepth: 8,
      colorType: 3,
      transparency: <Buffer 00>,
      palette: <Buffer 36 39 3f 00 00 00 38 33 45 d7 a4 8c 46 3e 44 02 02 02 c5 14 04 3c 36 49 cf 9f 68 3a 35 48 35 35 35 39 34 46 f1 c7 78 05 05 06 0a 09 0b 22 22 23 0d 0c ... 718 more bytes>,
      data: <Buffer 78 da ed 7d 77 74 54 f7 9d 2f 23 e9 32 1a 0d 77 7a b1 1a 23 69 66 24 a1 82 46 1e 15 46 bd d2 0d 46 b2 91 ad 42 10 06 1b 21 10 dd 20 d1 bb 29 a6 99 6e ... 17994 more bytes>,
      rgba: null
    },
    // other frames
  ]
}

License

This project is licensed under the ISC License.

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

Author

Created by Crytek1012.