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

Can we get a functional sample? #1

Closed
breedx2 opened this issue Dec 30, 2014 · 4 comments
Closed

Can we get a functional sample? #1

breedx2 opened this issue Dec 30, 2014 · 4 comments

Comments

@breedx2
Copy link

breedx2 commented Dec 30, 2014

Hi. I love this port and am really wanting to use it in a project. I've looked through the source and the source for rainbowbot but can't seem to get a working sample going. Do you think you can hack one together? Rainbowbot doesn't actually seem to use your thief port, but rather a copy quantize...which is unfortunate.

The problem I'm encountering is

TypeError: Image or Canvas expected

from thief/index.js:40

I've tried passing it both a Canvas instance and an instance of Canvas.Image to no avail.

@breedx2
Copy link
Author

breedx2 commented Dec 30, 2014

For what it's worth, I think the problem I'm encountering is caused by this issue in canvas: Automattic/node-canvas#487

@Vuurbaard
Copy link

Any luck getting this to work? Some sort of example would be really usefull...

@zeke
Copy link
Owner

zeke commented Mar 4, 2015

Sorry I haven't gotten around to this. The project works but it's unmaintained and I'm too busy at the moment. You may want to give this other thing a try: https://www.npmjs.com/package/get-rgba-palette

cc @mattdesl who probably knows about other alternatives...

@mattdesl
Copy link

mattdesl commented Mar 4, 2015

The quantize module is really all you need to get a basic color palette. If you have RGBA pixels (like those from Canvas getImageData) you can use get-rgba-palette as zeke mentioned. Neither of those have any hard dependencies on Node or the browser.

@zeke zeke closed this as completed Mar 5, 2015
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

4 participants