Gimp.Channel.new

function new(image: Gimp.Image, name: String, width: Number(gint), height: Number(gint), opacity: Number(gdouble), color: Gegl.Color): Gimp.Channel {
    // Gjs wrapper for gimp_channel_new()
}
  

Create a new channel.

This procedure creates a new channel with the specified width, height, name, opacity and color.

Other attributes, such as channel visibility, should be set with explicit procedure calls.

The new channel still needs to be added to the image, as this is not automatic. Add the new channel with [method@Gimp.Image.insert_channel].

The channel's contents are undefined initially.

image

The image to which to add the channel.

name

The channel name.

width

The channel width.

height

The channel height.

opacity

The channel opacity.

color

The channel compositing color.

Returns

The newly created channel.