Load an image from a url into a PictureBox

Posted   智信智爱智强不息

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Load an image from a url into a PictureBox相关的知识,希望对你有一定的参考价值。

 

var url="https://xyk.cebbank.com/verify_code.jpg?3345789";

HttpClient client = new HttpClient();

Bitmap bitmap = null;
var stream = client.GetStreamAsync(url).Result;
bitmap = (Bitmap)Image.FromStream(stream);
this.PictureBox.Image = bitmap;

以上是关于Load an image from a url into a PictureBox的主要内容,如果未能解决你的问题,请参考以下文章