### Method

# Gimp Drawable foreground_extract

since: 2.4

#### 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`

  Type: `GimpForegroundExtractMode`

  The algorithm to use.

`mask`

  Type: `GimpDrawable`

  Tri-Map.

  The data is owned by the caller of the method.

#### Return value

Type: `gboolean`

TRUE on success.