Layer

Function

This function incorporates most of the other Layer operations, with the exception of KeyMix and AddText. There is no particular advantage to using Layer instead of one of the specific layer operations, except that you can test different modes quickly. You could do the same, however, just by selecting the Node and Ctrl+clicking on the new operation you want.

Parameters
Type
Defaults
Function
operation string "Over"

The expresssion used for the composite.

Possible values are:

Atop - Places fg Over bg only inside of bg's mask.
Common - Returns the differences or commanlities between two images
Constraint - limits one image and another by area, tolerance, channel, or field.
Copy - Copies channels from bg to fg.
IAdd - Adds fg to bg.
IDiv - Divides fg by bg.
IMult - Multiplies fg by by.
Inside - Places fg inside of bg's mask.
ISub - fg minus bg.
ISubA - absolute value of fg minus bg.
Max - takes greater pixel value of fg or bg.
Min - takes lesser pixel value of fg or bg.
Mix - mixes fg and bg by bgPercent. 0 means all fg, 100 means all bg.
Outside - places fg outside of bg's mask.
Over - places fg over bg. Default mode.
Screen - inverts both fg and bg, multiplies them together, and inverts back. This is good for reflections and glows.
SwitchMatte - Copies a channel from bg to the alpha channel of fg.
Under - places fg under bg.
Xor - performs boolean to keep only non-common elements.
ZCompose - Evaluates the Z information in the two images.


Synopsis

image Layer(
  image Foreground, 
  image Background, 
  string operation,
  ...
);


Script

image = Layer( 
  Foreground, 
  Background, 
  "operation",
   ...
);


Command Line

Don't use Layer. Instead, use the compositing operator you want. For example, don't use -layer bg "over", enter -over bg.

See Also
Atop, IAdd, IDiv, IMult, Inside, ISub, ISubA, Max, Min, Mix, Outside, Over, Screen, Under, Xor