02-05-2019, 07:32 AM
(02-05-2019, 06:59 AM)Jack Parker Wrote: [by now i see that the scheme API cannot even read the color value at a pixel...
You overlooked gimp-drawable-get-pixel. However scripts that read pixel by pixel are awfully slow. In python you can access the pixels as arrays, so things are a lot faster.
To smooth the edges you can do a "Select-by-color", then Select>To path, and then Select>From path and bucket fill the result on another layer. And if you are script-prone you can also tweak the path with a script between the two Select operations, and for instance discard points that create local sharp edges, etc... (see the *vector* functions). I can show you plenty of example code for this, but all in Python