Create a color matrix that converts an image to grayscale.
Syntax

[C#]

static XColorMatrix MakeGrayscale();
static XColorMatrix MakeGrayscale(double redWeight, double greenWeight, double blueWeight);

[Visual Basic]

Shared Function MakeGrayscale() As XColorMatrix
Shared Function MakeGrayscale(redWeight As Double, greenWeight As Double, blueWeight As Double) As XColorMatrix
Params
Name Description
redWeight The amount of brightness that red contributes.
greenWeight The amount of brightness that green contributes.
blueWeight The amount of brightness that blue contributes.
Notes

Use this method when you want to create a color matrix that converts a color image to grayscale.

By default, this matrix uses linear RGB weights rather than NTSC weights, but this can be overridden by specifying explicit values.

See Also

TransformColors

Example

None.