Monochrome

Function
The Monochrome function turns any image black and white. Default values are weighed according to the human eye’s different sensitivity to red, green, and blue, but you can override the weights. Notice that it reduces a 3-channel image (RGB) to a 1-channel image (BW), and a 4-channel image (RGBA) to a 2-channel image (BWA). If the three color channels are identical, it is more efficient to use a Reorder with a value of “rrr,” since only the red channel is read in. Monochrome reads all three channels in, and therefore has more I/O activity.

Parameters
Type
Defaults
Function
r,g,bWeight
float
.3, .59, .11
The defaults are set according to the eye's sensitivity to color, but you can balance the colors differently if you want to push a certain channel.

Synopsis

image Monochrome( image, 
  float rWeight, 
  float gWeight, 
  float bWeight
);

Script

image = Monochrome( image, rWeight, gWeight, bWeight);

Command Line

shake -monochrome rWeight gWeight bWeight