Table of Contents

Method ConvertToGrayscale

Namespace
Alternet.Skia
Assembly
Alternet.UI.Common.dll

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.