My code needs to do a one-pixel-wide selection, at distance "x" from the
current selection. This looks a lot like a border selection except that
the border selection creates at best a two-pixel wide ribbon and I only
want one (but if I'm wrong, please tell me how to :-)
So far my code goes like this:
# Selects pixels that are between x and x+1 pixels from
# the original selection. Bumping the selection by one
# each time doesn't work, a small circle degenerates into
# a square with rounded corners instead of a big circle.
That works, but can be slow (especially since it's at the core of a
loop). Is there any better way? Or useless code to jettison?
Next improvement is to create a 3-pixels selection and feather it one
pixel. Anything to be wary of?
Gimp-developer mailing list