Switch to full style
Post all Gimp scripts and script writing questions here
Post a reply

Convert a selection into an array of coordinates/points

Fri May 15, 2020 2:48 pm

Hello,
I'd like to know if there's an option to convert a selection (like a selection done using the Fuzzy select tool) into an array of coordinates that comprise that selection.

Re: Convert a selection into an array of coordinates/points

Fri May 15, 2020 2:57 pm

ocp1000 wrote:Hello,
I'd like to know if there's an option to convert a selection (like a selection done using the Fuzzy select tool) into an array of coordinates that comprise that selection.

You can use the Select>To Path option,
within the Selection Menu.

Re: Convert a selection into an array of coordinates/points

Fri May 15, 2020 3:49 pm

ocp1000 wrote:Hello,
I'd like to know if there's an option to convert a selection (like a selection done using the Fuzzy select tool) into an array of coordinates that comprise that selection.


If you convert the selection into a path, the path is expressed as a set of cubic Bézier splines (aka "strokes"). There is an API call to interpolate these "strokes" with a polygon of specified accuracy.
Post a reply