See also: Main Index; Alphabetic; Misc; By Author; By Module; By Menu External Links: The Gimp; Gimp User Manual
The Gimp select functions
gimp_by_color_select
Input:
| DRAWABLE | drawable | The affected drawable |
| COLOR | color | The color to select |
| INT32 | threshold | Threshold in intensity levels 0 <= threshold <= 255 |
| INT32 | operation | The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) } |
| INT32 | antialias | Antialiasing (TRUE or FALSE) |
| INT32 | feather | Feather option for selections |
| SUCCESS | feather_radius | Radius for feather operation |
| INT32 | sample_merged | Use the composite image, not the drawable |
Returns: nothing
This tool creates a selection over the specified image. A by-color selection is determined by the supplied color under the constraints of the specified threshold. Essentially, all pixels (in the drawable) that have color sufficiently close to the specified color (as determined by the threshold value) are included in the selection. The antialiasing parameter allows the final selection mask to contain intermediate values based on close misses to the threshold bar. Feathering can be enabled optionally and is controlled with the "feather_radius" parameter. If the sample_merged parameter is non-zero, the data of the composite image will be used instead of that for the specified drawable. This is equivalent to sampling for colors after merging all visible layers. In the case of a merged sampling, the supplied drawable is ignored.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_ellipse_select
Input:
| IMAGE | image | The image |
| SUCCESS | x | x coordinate of upper-left corner of ellipse bounding box |
| SUCCESS | y | y coordinate of upper-left corner of ellipse bounding box |
| SUCCESS | width | The width of the ellipse: 0 < width |
| SUCCESS | height | The height of the ellipse: 0 < height |
| INT32 | operation | The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) } |
| INT32 | antialias | Antialiasing (TRUE or FALSE) |
| INT32 | feather | Feather option for selections |
| SUCCESS | feather_radius | Radius for feather operation |
Returns: nothing
This tool creates an elliptical selection over the specified image. The elliptical region can be either added to, subtracted from, or replace the contents of the previous selection mask. If antialiasing is turned on, the edges of the elliptical region will contain intermediate values which give the appearance of a sharper, less pixelized edge. This should be set as TRUE most of the time. If the feather option is enabled, the resulting selection is blurred before combining. The blur is a gaussian blur with the specified feather radius.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_free_select
Input:
| IMAGE | image | The image |
| INT32 | num_segs | Number of points (count 1 coordinate as two points) |
| FLOATARRAY | segs | Array of points: { p1.x, p1.y, p2.x, p2.y, ..., pn.x, pn.y} |
| INT32 | operation | The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) } |
| INT32 | antialias | Antialiasing (TRUE or FALSE) |
| INT32 | feather | Feather option for selections |
| SUCCESS | feather_radius | Radius for feather operation |
Returns: nothing
This tool creates a polygonal selection over the specified image. The polygonal region can be either added to, subtracted from, or replace the contents of the previous selection mask. The polygon is specified through an array of floating point numbers and its length. The length of array must be 2n, where n is the number of points. Each point is defined by 2 floating point values which correspond to the x and y coordinates. If the final point does not connect to the starting point, a connecting segment is automatically added. If the feather option is enabled, the resulting selection is blurred before combining. The blur is a gaussian blur with the specified feather radius.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_fuzzy_select
Input:
| DRAWABLE | drawable | The affected drawable |
| SUCCESS | x | x coordinate of initial seed fill point: (image coordinates) |
| SUCCESS | y | y coordinate of initial seed fill point: (image coordinates) |
| INT32 | threshold | Threshold in intensity levels 0 <= threshold <= 255 |
| INT32 | operation | The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) } |
| INT32 | antialias | Antialiasing (TRUE or FALSE) |
| INT32 | feather | Feather option for selections |
| SUCCESS | feather_radius | Radius for feather operation |
| INT32 | sample_merged | Use the composite image, not the drawable |
Returns: nothing
This tool creates a fuzzy selection over the specified image. A fuzzy selection is determined by a seed fill under the constraints of the specified threshold. Essentially, the color at the specified coordinates (in the drawable) is measured and the selection expands outwards from that point to any adjacent pixels which are not significantly different (as determined by the threshold value). This process continues until no more expansion is possible. The antialiasing parameter allows the final selection mask to contain intermediate values based on close misses to the threshold bar at pixels along the seed fill boundary. Feathering can be enabled optionally and is controlled with the "feather_radius" paramter. If the sample_merged parameter is non-zero, the data of the composite image will be used instead of that for the specified drawable. This is equivalent to sampling for colors after merging all visible layers. In the case of a merged sampling, the supplied drawable is ignored.If the sample is merged, the specified coordinates are relative to the image origin; otherwise, they are relative to the drawable's origin.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_rect_select
Input:
| IMAGE | image | The image |
| SUCCESS | x | x coordinate of upper-left corner of rectangle |
| SUCCESS | y | y coordinate of upper-left corner of rectangle |
| SUCCESS | width | The width of the rectangle: 0 < width |
| SUCCESS | height | The height of the rectangle: 0 < height |
| INT32 | operation | The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) } |
| INT32 | feather | Feather option for selections |
| SUCCESS | feather_radius | Radius for feather operation |
Returns: nothing
This tool creates a rectangular selection over the specified image. The rectangular region can be either added to, subtracted from, or replace the contents of the previous selection mask. If the feather option is enabled, the resulting selection is blurred before combining. The blur is a gaussian blur with the specified feather radius.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_all
Input:
Returns: nothing
This procedure sets the selection mask to completely encompass the image. Every pixel in the selection channel is set to 255.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_border
Input:
| IMAGE | image | The image |
| INT32 | radius | Radius of border (in pixels) |
Returns: nothing
This procedure borders the selection. Bordering creates a new selection which is defined along the boundary of the previous selection at every point within the specified radius.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_bounds
Input:
Returns:
| INT32 | non_empty | True if there is a selection |
| INT32 | x1 | x coordinate of upper left corner of selection bounds |
| INT32 | y1 | y coordinate of upper left corner of selection bounds |
| INT32 | x2 | x coordinate of lower right corner of selection bounds |
| INT32 | y2 | y coordinate of lower right corner of selection bounds |
This procedure returns whether there is a selection for the specified image. If there is one, the upper left and lower right corners of the bounding box are returned. These coordinates are relative to the image. Please note that the pixel specified by the lower righthand coordinate of the bounding box is not part of the selection. The selection ends at the upper left corner of this pixel. This means the width of the selection can be calculated as (x2 - x1), its height as (y2 - y1).
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_clear
Input:
Returns: nothing
This procedure is deprecated! Use 'gimp_selection_none' instead.
;
gimp_selection_combine
Input:
| CHANNEL | channel | The channel |
| INT32 | operation | The selection operation: { GIMP_CHANNEL_OP_ADD (0), GIMP_CHANNEL_OP_SUBTRACT (1), GIMP_CHANNEL_OP_REPLACE (2), GIMP_CHANNEL_OP_INTERSECT (3) } |
Returns: nothing
This procedure combines the specified channel into the selection mask.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_feather
Input:
| IMAGE | image | The image |
| SUCCESS | radius | Radius of feather (in pixels) |
Returns: nothing
This procedure feathers the selection. Feathering is implemented using a gaussian blur.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_float
Input:
| DRAWABLE | drawable | The drawable from which to float selection |
| INT32 | offx | x offset for translation |
| INT32 | offy | y offset for translation |
Returns:
| LAYER | layer | The floated layer |
This procedure determines the region of the specified drawable that lies beneath the current selection. The region is then cut from the drawable and the resulting data is made into a new layer which is instantiated as a floating selection. The offsets allow initial positioning of the new floating selection.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_grow
Input:
| IMAGE | image | The image |
| INT32 | steps | Steps of grow (in pixels) |
Returns: nothing
This procedure grows the selection. Growing involves expanding the boundary in all directions by the specified pixel amount.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_invert
Input:
Returns: nothing
This procedure inverts the selection mask. For every pixel in the selection channel, its new value is calculated as (255 - old_value).
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_is_empty
Input:
Returns:
| INT32 | is_empty | Is the selection empty? |
This procedure returns non-zero if the selection for the specified image is not empty.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_load
Input:
| CHANNEL | channel | The channel |
Returns: nothing
This procedure loads the specified channel into the selection mask.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_none
Input:
Returns: nothing
This procedure deselects the entire image. Every pixel in the selection channel is set to 0.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_save
Input:
Returns:
| CHANNEL | channel | The new channel |
This procedure copies the selection mask and stores the content in a new channel. The new channel is automatically inserted into the image's list of channels.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_sharpen
Input:
Returns: nothing
This procedure sharpens the selection mask. For every pixel in the selection channel, if the value is > 0, the new pixel is assigned a value of 255. This removes any "anti-aliasing" that might exist in the selection mask's boundary.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_shrink
Input:
| IMAGE | image | The image |
| INT32 | radius | Radius of shrink (in pixels) |
Returns: nothing
This procedure shrinks the selection. Shrinking invovles trimming the existing selection boundary on all sides by the specified number of pixels.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_translate
Input:
| IMAGE | image | The image |
| INT32 | offx | x offset for translation |
| INT32 | offy | y offset for translation |
Returns: nothing
This procedure actually translates the selection for the specified image by the specified offsets. Regions that are translated from beyond the bounds of the image are set to empty. Valid regions of the selection which are translated beyond the bounds of the image because of this call are lost.
Spencer Kimball & Peter Mattis; 1995-1996
gimp_selection_value
Input:
| IMAGE | image | The image |
| INT32 | x | x coordinate of value |
| INT32 | y | y coordinate of value |
Returns:
| INT32 | value | Value of the selection: (0 <= value <= 255) |
This procedure returns the value of the selection at the specified coordinates. If the coordinates lie out of bounds, 0 is returned.
Spencer Kimball & Peter Mattis; 1995-1996
| The Gimp 2.3.2 (win32) | Documentation fresh from PDB | 22:53:15 Fr 22.07.2005 |
| Generated by pdb2doc.py written by Hans Breuer <Hans@Breuer.org> |