### Method

# Gimp Drawable foreground_extract

#### Declaration [src]

    gboolean
    gimp_drawable_foreground_extract (
      GimpDrawable* drawable,
      GimpForegroundExtractMode mode,
      GimpDrawable* mask
    )

#### Description [src]

Extract the foreground of a drawable using a given trimap.

Image Segmentation by Uniform Color Clustering, see https://www.inf.fu-berlin.de/inst/pubs/tr-b-05-07.pdf.

Available since: | 2.4

#### Parameters

`mode` | `GimpForegroundExtractMode`
| The algorithm to use.
`mask` | `GimpDrawable`
| Tri-Map.
| The data is owned by the caller of the function.

#### Return value

Returns: | `gboolean`
| TRUE on success.