GIMP Script-fu

Artifact Content

Artifact bf48d55295746db748bbc213e1f4796157d433cd:

Wiki page [sg-channel-blend] by saulgoode 2014-06-16 15:20:37.
D 2014-06-16T15:20:37.721
L sg-channel-blend
P 5311221973c51cc2ced11bcbacaf72966509ab99
U saulgoode
W 2162
<dl><dt><b>Command:</b> <dd>Channel Blend</dd></dt>
<dt><b>Menu:</b> <dd>"<Channels>/Blend Down..."</dd>
<dd>"<Channels>/Show only"</dd>
<dd>"<Layers>/Show only"</dd></dt>
<dt><b>PDB Name:</b> <dd>script-fu-sg-channel-blend</dd></dt>
<dt><b>Download:</b> <dd>[|sg-channel-blend.scm] (after the page appears, click on the "Download" command)</dd></dt>
<dt><b>License:</b> <dd>[copyright|GPLv2+]</dd></dt>

<dt><b>Description:</b> <dd>This script permits blending of two channels using any of the typical layer modes (except for the color ones, which are not relevant for grayscale channels). 

The main utility of the script is for subtracting the current selection from a channel to produce a new channel; the normal interface only supports subtracting a channel from the selection. In order to subtract the current selection from a channel, enter Quickmask mode and run the script (note that for this particular case, the resulting blended channel will become the new Quickmask).

The other blending modes offered by script may be useful in other situations, though there is admittedly a good deal of redundancy in the offerings (for consistency's sake, I retained the same dropdown menu as offered in the Layers Dialog).

Unlike a layer Merge Down, the channel Blend Down command offers the option of blending hidden channels (since it is often the case that channels are not visible, this is the default behavior). You can also adjust the opacity of the blended channel. 

The script also adds a "Show only" command to each of the Channels menu and the Layers menu (not the Layer menu). This simple utility command will hide all other drawables except the active one, permitting you to see, for example, a channel by itself.

Technical note: There seems to be an anomaly (bug?) in GIMP behavior such that "Re-Show" (CTRL-SHIFT-f) generates an error for the Blend Down filter when attempting to re-apply it to the Quickmask. Apparently activating Quickmask is failing to generate a message signifying the update of the active drawable.

Z 11f3fb1d0d9b04f246bf5f4e099029b7