ChangeBrushTransparency -- change transparency mode of brush (V5.0)
ChangeBrushTransparency(id, mode)
This command can be used to change the transparency mode of a brush. Hollywood currently supports three different transparency modes:

No transparency. The entire brush is visible.

Monochrome transparency. Every pixel can either be visible or invisible.

Gradual transparency. Every pixel can have 256 different levels of transparency. An alpha channel value of 0 means full transparency, whereas an alpha channel value of 255 means no transparency.

ChangeBrushTransparency() is especially useful for switching between the #MASK and #ALPHACHANNEL modes. For example, when you load a brush using LoadBrush() and you use the Transparency tag to make a color transparent, you will always get a brush that has a #MASK transparency mode. However, in some cases you might want the brush to use a mode of #ALPHACHANNEL instead; because you want to modify the values using SelectAlphaChannel(), for example. In that case, ChangeBrushTransparency() can be quite helpful.

brush whose transparency mode you want to change
desired new transparency; can be #NONE, #MASK, or #ALPHACHANNEL
LoadBrush(1, "test.iff", {Transparency = #RED})
ChangeBrushTransparency(1, #ALPHACHANNEL)
The code above loads the image "test.iff" into brush 1, makes color red transparent, and then changes the transparency mode from #MASK to #ALPHACHANNEL.

Show TOC