Table of Contents

Method DeserializeImage

Namespace
SkiaSharp.Extended
Assembly
SkiaSharp.Extended.dll

DeserializeImage(string, int, int, float)

Decodes a BlurHash string into an SKImage of the specified dimensions.

public static SKImage DeserializeImage(string blurHash, int width, int height, float punch = 1)

Parameters

blurHash string

The BlurHash string to decode.

width int

The width of the resulting image in pixels.

height int

The height of the resulting image in pixels.

punch float

A factor that adjusts color intensity. Values greater than 1 increase contrast.

Returns

SKImage

An SKImage representing the decoded BlurHash.

Exceptions

ArgumentNullException

blurHash is null.

ArgumentOutOfRangeException

width or height is less than or equal to zero.

DeserializeImage(ReadOnlySpan<char>, int, int, float)

Decodes a BlurHash string into an SKImage of the specified dimensions.

public static SKImage DeserializeImage(ReadOnlySpan<char> blurHash, int width, int height, float punch = 1)

Parameters

blurHash ReadOnlySpan<char>

The BlurHash character span to decode.

width int

The width of the resulting image in pixels.

height int

The height of the resulting image in pixels.

punch float

A factor that adjusts color intensity. Values greater than 1 increase contrast.

Returns

SKImage

An SKImage representing the decoded BlurHash.

Exceptions

ArgumentOutOfRangeException

width or height is less than or equal to zero.