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

This procedure extracts the foreground from `drawable` using `mask` as a trimap. Set white as foreground, black as background and uncertain pixels as any other value, for the tri-map.

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.