# Gimp.Drawable.foreground_extract

    @accepts(Gimp.Drawable, Gimp.ForegroundExtractMode, Gimp.Drawable)
    @returns(bool)
    def foreground_extract(self, mode, mask):
        # Python wrapper for gimp_drawable_foreground_extract()

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

Since 2.4

self

  The drawable.

mode

  The algorithm to use.

mask

  Tri-Map.

Returns