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 an API to fetch the lasso selected areas info.? #80

Open
zhengying opened this issue Jun 25, 2022 · 1 comment
Open

Is there an API to fetch the lasso selected areas info.? #80

zhengying opened this issue Jun 25, 2022 · 1 comment
Labels

Comments

@zhengying
Copy link

I want to fetch lasso-selected areas information, but I can't find API related.
if there is no API for that, is there any plan for this feature?

@dacap
Copy link
Member

dacap commented Jun 27, 2022

Hi @zhengying, there were plans to add a Image:pixels(selection) but it wasn't implemented yet (Image:pixels).

I think there are two possible workarounds:

  1. to create a temporary layer, fill it with some color, clear the region, then iterate all the pixels that are masked to know where the region was located, and then restore the selection back. Anyway it's not simple.
  2. other possibility is iterating the Selection.bounds and checking if each pixel is in the selection with Selection:contains

@dacap dacap added the feature label Jun 27, 2022
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

2 participants