# IK Desaturate Image

IK Desaturate Image Image Number, Mode

## Description

This command will desaturate the image (convert the image to a greyscale image). This command does not work with render targets. If the mode is not listed below, this command will be ignored.
This command does not work with render targets, but the same effect can be achieved using the effect commands and a pixel shader.
A list of available modes are:

Constant name | Constant | Description
DESATURATE_LIGHTNESS | 1 | This technique averages the maximum and minimum channel value of a color for each pixel.
DESATURATE_LUMINOSITY | 2 | This technique uses a weighted average for each component, conform with how people perceive the luminosity of a color. The weights are red = 0.31, green = 0.61, blue = 0.08
DESATURATE_AVERAGE | 3 | This technique averages the components of a color for each pixel.

## Parameters

Image Number | Integer | The ID of the image.
Mode | Integer | The desaturation mode.

Index