As the heading says, i'm trying to download a webp image then load it into my picturebox.
This is the code, I get the image but it's now showing
What's wrong?
This is the code, I get the image but it's now showing
What's wrong?
C#:
HttpClient client = new HttpClient();
string _url = "https://www.mydomain.com/images/" + profile.imageSrc;
_ = getImage(client, _url);
C#:
private async Task getImage(HttpClient client, string _url)
{
byte[] data = await client.GetByteArrayAsync(_url);
File.WriteAllBytes("image.jpg", data);
PictureBox1.Image = Image.FromFile(@"image.jpg");
}