PNG and APNG implementation.
<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>
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, ...);
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));