Invert

Function
The Invert function inverts the color curve, so white becomes black and black becomes white. A predominantly yellow image becomes predominantly blue if the red, green, and blue (rgb) channels are selected in the channels field.

Invert also works on the Z channel, but assumes the Z is normalized, for example, between 0 and 1. If this is not the case, you have an unpredictable result. If you need to invert a nonnormalized Z channel, use ColorX with a formula similar to the following in the Z channel:

[MaxZRange]-z

Parameters
Type
Defaults
Function
channels
string
"rgba"

The channels you wish to invert. You can use r,g,b, a, and/or z. To use multiple channels, just list them out:
rgz

This will invert the red, green and Z channels.

Synopsis

image Invert( image, const char * channels );
  

Script

image = Invert( image, "channels" );

Command Line

shake -invert channels