Function

Gimppalette_get_colors

Declaration [src]

GimpRGB*
gimp_palette_get_colors (
  const gchar* name,
  gint* num_colors
)

Description [src]

Gets all colors from the specified palette.

This procedure retrieves all color entries of the specified palette.

Available since:2.6

Parameters

name const gchar*
 

The palette name.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
num_colors gint*
 

Length of the colors array.

 The argument will be set by the function.

Return value

Returns: An array of GimpRGB*
 
     The colors in the palette.
     The returned value must be freed with g_free().
 The length of the array is in the num_colors argument.
 The caller of the function takes ownership of the data, and is responsible for freeing it.