Table of Contents

Method ConvertToGrayscale

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

ConvertToGrayscale(Image)

Converts the specified Image to a grayscale version.

public static Image ConvertToGrayscale(Image image)

Parameters

image Image

The Image to convert to grayscale.

Returns

Image

A new Image instance containing the grayscale version of the input image.

ConvertToGrayscale(SKBitmap)

Converts the specified SKBitmap to a grayscale version using a color filter.

public static SKBitmap ConvertToGrayscale(SKBitmap bitmap)

Parameters

bitmap SKBitmap

The SKBitmap to convert to grayscale.

Returns

SKBitmap

A new SKBitmap instance containing the grayscale version of the input bitmap.

Exceptions

ArgumentNullException

Thrown if the bitmap parameter is null.