Invert

Function
This function inverts the color curve, so white becomes black and black becomes white. A predominantly yellow image will become predominantly blue if the r,g, and b channels are selected.

Invert will also work on the Z channel, but it assumes the Z is normalized, ie, between 0 and 1. If this is not the case, you will have an unpredictable result. If you need to invert a non-normalized Z channel, use ColorX with a formula something like this 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