https://github.com/uupaa/APNG.js
PNG and APNG decoder and renderer.
https://github.com/uupaa/APNG.js
Last synced: 7 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 (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-08T10:49:21.000Z (about 10 years ago)
- Last Synced: 2024-04-26T02:43:58.470Z (about 1 year 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 [](https://travis-ci.org/uupaa/PNG.js)
[](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));
```