Method

GimpImageget_colormap

Declaration [src]

guchar*
gimp_image_get_colormap (
  GimpImage* image,
  gint* colormap_len,
  gint* num_colors
)

Description [src]

Returns the image’s colormap

This procedure returns an actual pointer to the image’s colormap, as well as the number of colors contained in the colormap. If the image is not of base type INDEXED, this pointer will be NULL.

Parameters

colormap_len

Type: gint*

The size (in bytes) of the returned colormap.

The argument will be set by the function.
The argument can be NULL.
num_colors

Type: gint*

Returns the number of colors in the colormap array.

The argument will be set by the function.
The argument can be NULL.

Return value

Type: An array of guchar

The image’s colormap.

The length of the array is in the colormap_len argument.
The data is owned by the instance.