-2
如何解决System.Drawing中参数无效 当我使用代码:如何解决System.Drawing中 - 参数无效
string img2 = "http://13.228.146.249:8080/jcr/groups/629.png;
byte[] toBytes = Encoding.ASCII.GetBytes(img2);
if (toBytes != null)
{
MemoryStream ms = new MemoryStream(toBytes);
ms.Position = 0;
picboxserver.Image = Image.FromStream(ms);
}
picboxserver是PictureBox的类型。
您试图将URL字符串作为图像,而不是位于该URL的数据。 –
picboxserver.ImageLocation = img2; –