mirror of
https://github.com/ultrasn0w/app.git
synced 2025-12-16 02:49:52 +01:00
Images
This commit is contained in:
12
APP/Utility/WebBoy.cs
Normal file
12
APP/Utility/WebBoy.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace APP.Utility;
|
||||
|
||||
internal static class WebBoy
|
||||
{
|
||||
private static readonly HttpClient Client = new();
|
||||
|
||||
internal static async Task<Bitmap> DownloadImage(string url)
|
||||
{
|
||||
await using var s = await Client.GetStreamAsync(url);
|
||||
return new Bitmap(s);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user