Table of Contents

Method Serialize

Namespace
SkiaSharp.Extended
Assembly
SkiaSharp.Extended.dll

Serialize(SKBitmap, int, int)

Encodes an SKBitmap into a BlurHash string.

public static string Serialize(SKBitmap bitmap, int componentsX, int componentsY)

Parameters

bitmap SKBitmap

The bitmap to encode.

componentsX int

The number of horizontal components (must be in the range [2..9]).

componentsY int

The number of vertical components (must be in the range [2..9]).

Returns

string

A BlurHash string representing the image.

Exceptions

ArgumentNullException

bitmap is null.

ArgumentOutOfRangeException

componentsX or componentsY is outside the range [2..9].

Serialize(SKImage, int, int)

Encodes an SKImage into a BlurHash string.

public static string Serialize(SKImage image, int componentsX, int componentsY)

Parameters

image SKImage

The image to encode.

componentsX int

The number of horizontal components (must be in the range [2..9]).

componentsY int

The number of vertical components (must be in the range [2..9]).

Returns

string

A BlurHash string representing the image.

Exceptions

ArgumentNullException

image is null.

ArgumentOutOfRangeException

componentsX or componentsY is outside the range [2..9].

Serialize(SKPixmap, int, int)

Encodes an SKPixmap into a BlurHash string.

public static string Serialize(SKPixmap pixmap, int componentsX, int componentsY)

Parameters

pixmap SKPixmap

The pixmap to encode.

componentsX int

The number of horizontal components (must be in the range [2..9]).

componentsY int

The number of vertical components (must be in the range [2..9]).

Returns

string

A BlurHash string representing the image.

Exceptions

ArgumentNullException

pixmap is null.

ArgumentOutOfRangeException

componentsX or componentsY is outside the range [2..9].