MrQ Remove Background.
(MrQ Remove background.py)
Author: MareroQ
Contributors:
from preview - Claude Lion
and bookmarks - J.F. Garcia
Remove background (area with a uniform color).
In menu: Layer → Remove Background ...
Ver.0.1
(30/09/2021)
Parameters
# Initial point for select contiguous color.
This creates a contiguous selection over the specified image. A contiguous color selection is determined by a seed fill under the constraints of the current context settings. Essentially, the color at the specified coordinates (in the drawable x and y coordinate of initial point) is measured and the selection expands outwards from that point to any adjacent pixels which are not significantly different
(as determined by the Threshold & Sample criterion). This process continues until no more expansion is possible. If antialiasing is turned on, the final selection mask will contain intermediate values based on close misses to the threshold bar at pixels along the seed fill boundary.
# Antialias
If antialiasing is turned on, the edges of selected region will contain intermediate values which give the appearance of a sharper, less pixelized edge.
# Threshold
This procedure modifies the sample threshold setting. If an operation depends on the colors of the pixels present in a drawable, this setting controls what is "sufficiently close" to be considered a similar color.
If the sample threshold has not been set explicitly, the default threshold set in gimprc will be used.
# Sample criterion
This setting controls how color similarity is determined. SELECT_CRITERION_COMPOSITE is the default value.
The sample criterion setting: SELECT-CRITERION-COMPOSITE (0), SELECT-CRITERION-R (1), SELECT-CRITERION-G (2), SELECT-CRITERION-B (3), SELECT-CRITERION-H (4),SELECT-CRITERION-S (5), SELECT-CRITERION-V (6), SELECT-CRITERION-A (7), SELECT-CRITERION-LCH-L (8), SELECT-CRITERION-LCH-C (9), SELECT-CRITERION-LCH-H (10).
# Feather
This procedure modifies the feathering setting. The selections will be blurred (the blur is a Gaussian blur; its rays can be controlled in the x and y directions).
If x and y = 0 blur not used.
# Grow
Specifies how deep it should work on the edges. Clean edges do not require more than one pixel. Try lower values first and increase the depth if necessary.
Ver.0.2
Creates a copy from the active layer and a mask/path from an inverted deleted selection. If the mask creation option is enabled, the deletion preview will not be visible.