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

Is there any way to select a region of an image to sample? #70

Closed
AlexThomas90210 opened this issue May 6, 2018 · 5 comments
Closed
Labels

Comments

@AlexThomas90210
Copy link

I would like to specify the region in pixels to sample in eg (x, y, width, height) of a square, then I would the dominant color for that region?

@maxcr
Copy link

maxcr commented Jul 27, 2018

Mark this as a feature request.

@1j01
Copy link

1j01 commented Sep 20, 2018

In Node.js, you could use one of these:

In the browser you could use canvas (with drawImage), altho it looks like you'd have to use toDataURL or toBlob until <canvas>-as-a-source support is added, see #75

@crutchcorn
Copy link
Member

One solution for this would be to crop the image first using a library like those mentioned by @1j01. However, we don't want to prevent asking for info. Marking as feature request, we'll come back to this after finishing work on bugs and documenting and cleaning up the monorepo work we've done

@sandstrom
Copy link

Since this can easily be solved in application code (as explained above), maybe it could be closed? (or moved to discussions, though you'd have to enable that for this repo first).

By closing some old issues we reduce the list of open issues to a more manageable set.

Many open-source projects expand their scope too much, and become difficult to maintain. It's usually better to keep the scope smaller, making it easier to maintain.

@crutchcorn
Copy link
Member

Marking this as closed, since it should be done ahead-of-time in another package as mentioned previously

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

No branches or pull requests

5 participants