求助,用C#编写 图片读取转换
如题,
最好通用,各表意见,能者多得.
------解决方案--------------------
转化成文本
MemoryStream ms = new MemoryStream();
pictureBox1.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
string strImage=Convert.ToBase64String(ms.GetBuffer()).ToString()
文本转化图片
byte[] bts = Convert.FromBase64String(strImage);
MemoryStream ms = new MemoryStream();
ms.Write(bts, 0, bts.Length);
pictureBox1.Image = Image.FromStream(ms);
------解决方案--------------------沒看明白,不知道說啥
------解决方案--------------------
读取:
C# code
Image image=Image.FromFile(string fileName);