SwitchMatte

Function
This is a Copy command dedicated to copying a channel from the second image into the matte channel of the first image. You can choose the source channel, if you want to invert the channel, and if you want to pre-multiply the result.

Parameters
Type
Defaults
Function
clipMode
int
1 Toggles between foreground (0) and background resolution (1)
channelMatte

string

 

"a"

Tells Shake what channels to copy from image B to image A's alpha channel.

matteMult
int
1

Turns on pre-multiplification of the resulting image by the new alpha.

0 = no pre-multiply
1 = pre-multiply matte

invertMatte
int
0

Inverts the resulting matte

0 = do not invert the matte
1 = invert the matte.


Synopsis

image SwitchMatte( 
  image Foreground, 
  image Background,
  int clipMode, 
  const char * matteChannel
  int matteMult,
  int invertMatte
);


Script

image = SwitchMatte( 
  Foreground, 
  Background,
  clipMode, 
  "channelMatte",
  matteMult,
  invertMatte
);


Command Line

shake -switchmatte image clipMode "channelMatte" etc...

See Also
Reorder, Copy, IAdd