Open tlhunter opened 10 years ago
Bump! Just ran into this myself, thanks for raising it.
Yes, totally true, this library is not usable as is because of this, because it throws exceptions from nowhere
Any chance of this being fixed - or is this npm abandoned ? Any good alternatives ?
Haven't found any better alternatitves personally ...
I'm now using pngjs rather than png-js
I'm using https://github.com/devongovett/png-stream these days.
If you have made a new, better library, what about deleting this one from Github?
It shouldn't be deleted from github, but it would be good to show a deprecated sign and link to the new png-stream repository
When you search for "png javascript" on Github, this is the first result. Many people start using it without noticing, that author "does not care" about this library for quite a long time.
Right now, I need to decode PNGs with palettes for my app https://www.Photopea.com and can't find a good library. Many good JS libs are made to work inside Node.js only. I think these bindings are completely unnecessary .
The callback function for png.decode should have two arguments. The first should be for handling an error, the second should be the image data.
As it stands, if an image is loaded for a file which does not exist, the cryptic crash happens: