# Gimp.Channel.new

    function new(image: Gimp.Image, name: String, width: Number(guint), height: Number(guint), 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 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.prototype.insert_channel command. Other attributes such as channel show masked, should be set with explicit procedure calls. 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. The object belongs to libgimp and you should not free it.