Constructor

GimpChannelnew_from_component

since: 2.4

Declaration [src]

GimpChannel*
gimp_channel_new_from_component (
  GimpImage* image,
  GimpChannelType component,
  const gchar* name
)

Description [src]

Create a new channel from a color component

This procedure creates a new channel from a color component. The new channel still needs to be added to the image, as this is not automatic. Add the new channel with gimp_image_insert_channel(). Other attributes, such as channel visibility, should be set with explicit procedure calls.

Available since: 2.4

Parameters

image

Type: GimpImage

The image to which to add the channel.

The data is owned by the caller of the function.
component

Type: GimpChannelType

The image component.

name

Type: const gchar*

The channel name.

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

Return value

Type: GimpChannel

The newly created channel.

The data is owned by the called function.