摘要: 1.GDI+ 中发生一般性错误。(从数据库读取图片,没有修改过就写回数据库,而引发的)参考:http://www.cnblogs.com/wudingfeng/archive/2008/07/24/1250564.htmlCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->byte[] pic =null; // 保存的图片if (PictureBox1.Image !=null){ // 解决"GDI+ 中发生一般性错误。" 阅读全文
posted @ 2010-03-24 17:17 炎峰森林影 阅读(768) 评论(0) 推荐(0) 编辑
摘要: 来源: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 ima 阅读全文
posted @ 2010-03-24 11:07 炎峰森林影 阅读(701) 评论(0) 推荐(0) 编辑