RSS/Atom feed Twitter
Site is read-only, email is disabled

Behaviour of "gimp-layer-create-mask" with channels

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Behaviour of "gimp-layer-create-mask" with channels Gino D 10 Jan 11:51
  Behaviour of "gimp-layer-create-mask" with channels Sven Neumann 10 Jan 12:08
Gino D
2010-01-10 11:51:37 UTC (about 15 years ago)

Behaviour of "gimp-layer-create-mask" with channels

Hi.

I need some clarification on how the Script-Fu procedure "gimp-layer-create-mask" acts with channels.

Supposing that the current image holds more than one channel, whether I wanted to call such procedure with its second argument "mask-type" set to "ADD-CHANNEL-MASK" (6) , how would the Script-Fu interpreter understand which channel to consider? Or rather, with what additional command should I specify the chosen channel?

Sven Neumann
2010-01-10 12:08:25 UTC (about 15 years ago)

Behaviour of "gimp-layer-create-mask" with channels

On Sun, 2010-01-10 at 11:51 +0100, Gino D wrote:

I need some clarification on how the Script-Fu procedure "gimp-layer-create-mask" acts with channels.

Supposing that the current image holds more than one channel, whether I wanted to call such procedure with its second argument "mask-type" set to "ADD-CHANNEL-MASK" (6) , how would the Script-Fu interpreter understand which channel to consider? Or rather, with what additional command should I specify the chosen channel?

If in doubt, read the source code:

layer_cmds.c (layer_create_mask_invoker):

if (mask_type == GIMP_ADD_CHANNEL_MASK) {
channel = gimp_image_get_active_channel (image);

The procedure will use the active channel. You can set the active channel using gimp-image-set-active-channel().

Sven