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

Better interface #2

Open
kuckir opened this issue Oct 19, 2013 · 1 comment
Open

Better interface #2

kuckir opened this issue Oct 19, 2013 · 1 comment

Comments

@kuckir
Copy link

kuckir commented Oct 19, 2013

Hi. I am looking for a PNG encoding library, which will take array of bytes (uncompressed image) and will return array of bytes (compressed image). It can be ArrayBuffer or just a simple array, e.g. [0, 255, 4, ...] (but classic Array usually takes at least 4 bytes per item, which is 4 times more than ArrayBuffer).

Can you add such an interface to your library? I see you are using Canvas as parameter. It seems very strange to me, when such a library requires DOM, when it should only manipulate with numbers.

@kuckir
Copy link
Author

kuckir commented Oct 19, 2013

I am very sorry, it seems, that your "canvas" variable can also be Uint8Array. It seems a little strange to me, to allow a variable of so many types ... what about making a separate function for each image representation?

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

1 participant