[C#] - image与byte数组的转换
2010-03-24 11:07
483 查看
来源:http://hi.baidu.com/donghaozheng/blog/item/91bf0c08fd60f4d463d9863b.html
// image to byte[] Image photo = new Bitmap(selectPictureFile); System.IO.MemoryStream ms = new System.IO.MemoryStream(); photo.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); byte[] imagedata = ms.GetBuffer(); // byte[] to image System.IO.MemoryStream ms = New IO.MemoryStream(imagedata) Bitmap b = new Bitmap(ms); //img = Drawing.Image.FromStream(ms)
相关文章推荐
- 请教一个C#中将byte[]数组转换为Image的问题
- C# byte数组与Image相互转换的方法
- [C#]image与byte数组的转换
- C# byte数组与Image相互转换的方法
- C#byte数组与Image的相互转换实例代码
- C#:Image与byte数组的相互转换
- c#获取网络图片 Image和byte[]数组的相互转换
- [C#参考]byte数组和Image的相互转换
- [C#]image与byte数组的相互转换
- c#中字节数组byte[]、图片image、流stream,字符串string、内存流MemoryStream、文件file,之间的转换
- C# byte数组与Image的相互转换
- C# byte数组与Image的相互转换
- 【转】C# byte数组与Image的相互转换
- C# byte数组与Image的相互转换
- C#语言的Image和byte数组的互相转换
- c#中字节数组byte[]、图片image、流stream,字符串string、内存流MemoryStream、文件file,之间的转换
- C#中 Unicode 字符串转换 iso8859-15 byte数组
- C# 文件转byte数组,byte数组再转换文件
- C# 对象、文件与二进制串(byte数组)之间的转换
- C# int字节 转换Byte数组 3位