### Function

# Gimp file_load_layers

since: 2.4

#### Declaration [src]

    GimpLayer**
    gimp_file_load_layers (
      GimpRunMode run_mode,
      GimpImage* image,
      GFile* file,
      gint* num_layers
    )

#### Description [src]

Loads an image file as layers for an existing image.

This procedure behaves like the file-load procedure but opens the specified image as layers for an existing image. The returned layers needs to be added to the existing image with gimp_image_insert_layer().

Available since: 2.4

#### Parameters

`run_mode`

  Type: `GimpRunMode`

  The run mode.

`image`

  Type: `GimpImage`

  Destination image.

  The data is owned by the caller of the function.

`file`

  Type: `GFile`

  The file to load.

  The data is owned by the caller of the function.

`num_layers`

  Type: `gint*`

  The number of loaded layers.

  The argument will be set by the function.

#### Return value

Type: An array of `GimpLayer*`

         The list of loaded layers.
         The returned value must be freed with g_free().

The length of the array is in the `num_layers` argument.
The caller of the function takes ownership of the data container, but not the data inside it.