将图片加载为byte[],处理,然后再输出到PictureBox

string path="test.jpg";

using (FileStream file = new FileStream(path, FileMode.Open))

 {

    byte[] b = new byte[file.Length];

    file.Read(b, 0, b.Length);

    MemoryStream stream = new MemoryStream(b);

    Player.Image=Image.FromStream(stream);

 }

 

你可能感兴趣的:(byte[])