Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selction bounding box & shrink radius
#1
I have been trying for a couple of days to find the relationship between a selection bounding box and the radius which is used for shrink or grow selection.
My first thoughts were that the radius would be half the diagonal of the bounding box, but this appears not to be true.

In the Shrink/Grow/Feather LIVE PREVIEW GIMP by TinT he has used a binary search routine to find the shrink radius which reduces the selection size to zero in order to set the minimum value for the adjustment slider. However, this is very slow for large images.

I thought that there must be a mathematical formula for the shrink radius that would reduce the size of the smallest bounding box side to half of it's original value.

Help from our resident geniuses greatly appreciated!

david.
Reply
#2
The shrink is an absolute distance in pixels between the old and new selections:

   

The diagonal, no,  but half the smallest dimension, certainly.
Reply
#3
(12-15-2023, 12:55 PM)Ofnuts Wrote: The shrink is an absolute distance in pixels between the old and new selections:



The diagonal, no,  but half the smallest dimension, certainly.

Many thanks! Problem solved.

My calculator has been hot for the last two days.
Shrink and Grow change the aspect ratio of the selection, so perhaps we need a relative Shrink and Grow?

david.
Reply
#4
(12-15-2023, 02:32 PM)./david Wrote:
(12-15-2023, 12:55 PM)Ofnuts Wrote: The shrink is an absolute distance in pixels between the old and new selections:



The diagonal, no,  but half the smallest dimension, certainly.

Many thanks! Problem solved.

My calculator has been hot for the last two days.
Shrink and Grow change the aspect ratio of the selection, so perhaps we need a relative Shrink and Grow?

david.

What you want then is Scale selection (Scale tool in Scale selection mode) (scaling center determination left as an exercise to the user).
Reply


Forum Jump: