Table of Contents

Method DeserializeBitmap

Namespace
SkiaSharp.Extended
Assembly
SkiaSharp.Extended.dll

DeserializeBitmap(string, int, int, float)

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

public static SKBitmap DeserializeBitmap(string blurHash, int width, int height, float punch = 1)

Parameters

blurHash string

The BlurHash string to decode.

width int

The width of the resulting bitmap in pixels.

height int

The height of the resulting bitmap in pixels.

punch float

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

Returns

SKBitmap

An SKBitmap representing the decoded BlurHash.

Exceptions

ArgumentNullException

blurHash is null.

ArgumentOutOfRangeException

width or height is less than or equal to zero.

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

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

public static SKBitmap DeserializeBitmap(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 bitmap in pixels.

height int

The height of the resulting bitmap in pixels.

punch float

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

Returns

SKBitmap

An SKBitmap representing the decoded BlurHash.

Exceptions

ArgumentOutOfRangeException

width or height is less than or equal to zero.