Method DeserializeBitmap
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
blurHashstringThe BlurHash string to decode.
widthintThe width of the resulting bitmap in pixels.
heightintThe height of the resulting bitmap in pixels.
punchfloatA factor that adjusts color intensity. Values greater than 1 increase contrast.
Returns
Exceptions
- ArgumentNullException
blurHashisnull.- ArgumentOutOfRangeException
widthorheightis 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
blurHashReadOnlySpan<char>The BlurHash character span to decode.
widthintThe width of the resulting bitmap in pixels.
heightintThe height of the resulting bitmap in pixels.
punchfloatA factor that adjusts color intensity. Values greater than 1 increase contrast.
Returns
Exceptions
- ArgumentOutOfRangeException
widthorheightis less than or equal to zero.