Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

png.decode callback function #14

Open
tlhunter opened this issue Aug 15, 2013 · 9 comments
Open

png.decode callback function #14

tlhunter opened this issue Aug 15, 2013 · 9 comments

Comments

@tlhunter
Copy link

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:

TypeError: Cannot read property '8' of undefined
@peterjwest
Copy link

Bump! Just ran into this myself, thanks for raising it.

@edi9999
Copy link

edi9999 commented Oct 10, 2015

Yes, totally true, this library is not usable as is because of this, because it throws exceptions from nowhere

@dceejay
Copy link

dceejay commented Jan 6, 2016

Any chance of this being fixed - or is this npm abandoned ? Any good alternatives ?

@edi9999
Copy link

edi9999 commented Jan 10, 2016

Haven't found any better alternatitves personally ...

@dceejay
Copy link

dceejay commented Jan 11, 2016

I'm now using pngjs rather than png-js

@devongovett
Copy link
Member

I'm using https://github.com/devongovett/png-stream these days.

@photopea
Copy link

If you have made a new, better library, what about deleting this one from Github?

@edi9999
Copy link

edi9999 commented Sep 27, 2016

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

@photopea
Copy link

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 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants