110,536
社区成员
发帖
与我相关
我的任务
分享
PictureBox pictureBox = new PictureBox();
pictureBox.Image = pictureBox1.InitialImage;
System.IO.MemoryStream stream = new System.IO.MemoryStream();
pictureBox.Image.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg);
picStream("E:\\photo1\\photo2\\photo3\\1.bmp");
public byte[] picStream(string picpath)
{
FileStream fs = new FileStream(picpath, FileMode.Open);
BinaryReader br = new BinaryReader(fs);
byte[] bytemp = br.ReadBytes(Convert.ToInt32(br.BaseStream.Length));
br.Close();
fs.Close();
return bytemp;
}