public static SKImage DeserializeImage(ReadOnlySpan <char> blurHash, int width, int height, float punch = 1f) { if (width <= 0) { throw new ArgumentOutOfRangeException(nameof(width)); } if (height <= 0) { throw new ArgumentOutOfRangeException(nameof(height)); } return(SKBlurHashDeserializer.DeserializeImage(blurHash, width, height, punch)); }
// Deserialize public static SKBitmap DeserializeBitmap(string blurHash, int width, int height, float punch = 1f) { if (blurHash == null) { throw new ArgumentNullException(nameof(blurHash)); } if (width <= 0) { throw new ArgumentOutOfRangeException(nameof(width)); } if (height <= 0) { throw new ArgumentOutOfRangeException(nameof(height)); } return(SKBlurHashDeserializer.DeserializeBitmap(blurHash.AsSpan(), width, height, punch)); }