本文实例讲述了C#实现把图片转换成二进制以及把二进制转换成图片的方法。分享给大家供大家参考,具体如下:
private void button1_Click(object sender, EventArgs e)
{
string path = this.textBox1.Text;
byte[] imgBytesIn = SaveImage(path);
ShowImgByByte(imgBytesIn);
//Parameters.Add(@Photo, SqlDbType.Binary).Value = imgBytesIn;
}
//将图片以二进制流
public byt
1