Skip to content

uupaa/APNG.js

Repository files navigation

PNG.js Build Status

npm

PNG and APNG implementation.

Document

Browser and NW.js(node-webkit)

<script src="<module-dir>/lib/WebModule.js"></script>
<script src="<module-dir>/lib/PNG.js"></script>
<script>

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

pngRender(pngData);
</script>

WebWorkers

importScripts("<module-dir>lib/WebModule.js");
importScripts("<module-dir>lib/PNG.js");

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

postMessage(pngData, ...);

Node.js

require("<module-dir>lib/WebModule.js");
require("<module-dir>lib/PNG.js");

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

About

PNG and APNG decoder and renderer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published