Gimp.Image.set_palette

### Method

# Gimp Imageset_palette

since: 3.0

#### Declaration [src]

    GimpPalette*
    gimp_image_set_palette (
      GimpImage* image,
      GimpPalette* new_palette
    )

#### Description [src]

Set the image’s colormap to a copy of `palette`

This procedure changes the image’s colormap to an exact copy of `palette` and returns the palette of `image`. If the image is not in Indexed color mode, nothing happens and `NULL` is returned.

Available since: 3.0

#### Parameters

`new_palette`

  Type: `GimpPalette`

  The palette to copy from.

  The data is owned by the caller of the method.

#### Return value

Type: `GimpPalette`

The image’s colormap palette.

The returned data is owned by the instance.