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