uupaa.png.js
0.0.3 • Public • Published PNG.js
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));
Package Sidebar
Install
Weekly Downloads