Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/uupaa/APNG.js
- Owner: uupaa
- License: mit
- Created: 2015-04-19T14:52:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-08T10:49:21.000Z (over 9 years ago)
- Last Synced: 2024-04-26T02:43:58.470Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 180 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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));
```