获取图片:
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{ string fullpath = openFileDialog1.FileName;pictureBox2.Image = GetFile(fullpath);
}
private Image GetFile(string path){MemoryStream stream = ReadFile(path);return stream == null ? null : Image.FromStream(stream);}