brute for pngparse output into html5 ImageData compliance
merged in tmpvar's pull request for pngparse fix, fixed some bugs in it