uupaa.png.js

0.0.3 • Public • Published

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));

Package Sidebar

Install

npm i uupaa.png.js

Weekly Downloads

3

Version

0.0.3

License

MIT

Last publish

Collaborators

  • uupaa