api
api copied to clipboard
Is there an API to fetch the lasso selected areas info.?
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?
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:
- 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.
- other possibility is iterating the Selection.bounds and checking if each pixel is in the selection with Selection:contains