Constructor

GimpChannelnew

Declaration [src]

GimpChannel*
gimp_channel_new (
  GimpImage* image,
  const gchar* name,
  guint width,
  guint height,
  gdouble opacity,
  const GimpRGB* color
)

Description [src]

Create a new channel.

This procedure creates a new channel with the specified width and height. Name, opacity, and color are also supplied parameters. The new channel still needs to be added to the image, as this is not automatic. Add the new channel with the gimp_image_insert_channel() command. Other attributes such as channel show masked, should be set with explicit procedure calls. The channel’s contents are undefined initially.

Parameters

image GimpImage
 

The image to which to add the channel.

 The data is owned by the caller of the function.
name const gchar*
 

The channel name.

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

The channel width.

height guint
 

The channel height.

opacity gdouble
 

The channel opacity.

color GimpRGB
 

The channel compositing color.

 The data is owned by the caller of the function.

Return value

Returns: GimpChannel
 

The newly created channel. The object belongs to libgimp and you should not free it.

 The data is owned by the called function.