Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/uupaa/APNG.js

PNG and APNG decoder and renderer.
https://github.com/uupaa/APNG.js

Last synced: 4 months ago
JSON representation

PNG and APNG decoder and renderer.

Awesome Lists containing this project

README

        

# PNG.js [![Build Status](https://travis-ci.org/uupaa/PNG.js.svg)](https://travis-ci.org/uupaa/PNG.js)

[![npm](https://nodei.co/npm/uupaa.png.js.svg?downloads=true&stars=true)](https://nodei.co/npm/uupaa.png.js/)

PNG and APNG implementation.

## Document

- PNG.js made of [WebModule](https://github.com/uupaa/WebModule).
- [Spec](https://github.com/uupaa/PNG.js/wiki/PNG)

## Browser and NW.js(node-webkit)

```js

var pngBinary = new Uint8Array(...);
var pngData = WebModule.PNG.decode(source, WebModule.PNG.parse(pngBinary));

pngRender(pngData);

```

## WebWorkers

```js
importScripts("lib/WebModule.js");
importScripts("lib/PNG.js");

var pngBinary = new Uint8Array(...);
var pngData = WebModule.PNG.decode(source, WebModule.PNG.parse(pngBinary));

postMessage(pngData, ...);
```

## Node.js

```js
require("lib/WebModule.js");
require("lib/PNG.js");

var pngBinary = new Uint8Array(...);
var pngData = WebModule.PNG.decode(source, WebModule.PNG.parse(pngBinary));
```