Poor compression ratio
I am compressing 512x512 pixels image and your library produces 1 MB PNG file. GIMP produces 42 kB PNG file for the same imgae.
I don't know too much about compression in PNG, but are you going to implement any better compression methods? Or do you know a JS library, which already implements them?
The script does not compress the image data at all. PNG uses deflate algorithm and I just use the store method (inflateStore function), because I wasn't interested in that algorithm.
If you can find a javascript deflate library, you can probably use that to compress the data and replace "compressedScanlines = DEFLATE_METHOD + inflateStore(scanlines)" with the appropriate method value and function call
Thanks, I found this library https://github.com/imaya/CanvasTool.PngEncoder - it produces 38 kB PNG for my image, but it takes about 2 seconds to encode :(
Well JavaScript isn't really known for its blazing speed.