How to shrink selection from two sides in GIMP script?
I need to shrink selection in my GIMP script. Default shrink selection command shrinks the whole selection by given size value in pixels. (gimp-selection-shrink inImage 2) This would shrink selection by 2 pixels. But I don't want to shrink the whole selection. I just want to remove selection from left and right side, keeping vertical selection unmodified. That requires removing the farthest pixels on each side (left and right) from selection mask. How can I do that? Script desired effect for value "3px": https://media.giphy.com/media/l3q2v50vsk8Ze8Ldu/source.gif As you can see, it's quite rectangular on left and right side and it's required for user to make a selection like this. So I think a good approach would be to get left and right posX of selection mask and cut the rect with height of the layer and width of pixels we want to cut off on each side of selection mask. I'd like to use Script-Fu instead of Python-Fu, because I don't like have extra requirements for the users.
Save your selection Get the bounding box (gimp-selection-bounds) Shrink that box (+2px to Xmin, -4px to width) Create a rectangle selection from these new values Intersect with saved selection
Unselect all sections when “Custom” InstType is chosen
Drawing transform independent layout bounds in JavaFX
How to perform rank based selection in a genetic algorithm?
Copy-paste of selections with Xlib in X11: XA_TARGETS array of atoms
Selecting who should breed with whom from a list of qualified parents?
programmatically change selected rows in a slickgrid
dgrid selection- select row only when I click on check box
Getting the Root-Element of an EObject which is being listened in a Tree-/Tableviewer
Rangy expands for cyrillic
Couldn't find box selection in Jdeveloper
In SAS, calculate value using conditional logic with different variables
Disable Text Selection in Chromium Embedded?
Retrieving Selection Data from Applications other than xterm
How to activate selected text replacement when typing new text?
GIMP: Subtract overlapping selections
Opencart: Add extra features under the same product