Gimp.Channel.new_from_component

function new_from_component(image: Gimp.Image, component: Gimp.ChannelType, name: String): Gimp.Channel {
    // Gjs wrapper for gimp_channel_new_from_component()
}
  

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.prototype.insert_channel. Other attributes, such as channel visibility, should be set with explicit procedure calls.

Since 2.4

image

The image to which to add the channel.

component

The image component.

name

The channel name.

Returns

The newly created channel.