# Gimp.Image.flatten

    @accepts(Gimp.Image)
    @returns(Gimp.Layer)
    def flatten(self):
        # Python wrapper for gimp_image_flatten()

Flatten all visible layers into a single layer. Discard all invisible layers.

This procedure combines the visible layers in a manner analogous to merging with the CLIP_TO_IMAGE merge type. Non-visible layers are discarded, and the resulting image is stripped of its alpha channel.

self

  The image.

Returns