Gimp.Layer.new_from_drawable
Description: Reference for Gimp.Layer.new_from_drawable

### Constructor

# Gimp Layernew_from_drawable

#### Declaration [src]

    GimpLayer*
    gimp_layer_new_from_drawable (
      GimpDrawable* drawable,
      GimpImage* dest_image
    )

#### Description [src]

Create a new layer by copying an existing drawable.

This procedure creates a new layer as a copy of the specified drawable. The new layer still needs to be added to the image, as this is not automatic. Add the new layer with the `gimp_image_insert_layer()` command. Other attributes such as layer mask modes, and offsets should be set with explicit procedure calls.

#### Parameters

`drawable`

  Type: `GimpDrawable`

  The source drawable from where the new layer is copied.

  The data is owned by the caller of the function.

`dest_image`

  Type: `GimpImage`

  The destination image to which to add the layer.

  The data is owned by the caller of the function.

#### Return value

Type: `GimpLayer`

The newly copied layer.

The data is owned by the called function.