关于从数据库取出image,并保存成jpeg图片。
7xin 2004-10-15 11:11:05 代码如下:
***************************************
byte[] image_bytes=(byte[])myRow1["pic_value"];
string path="/user/wangxf/"+max_id;
//保存原图片
MemoryStream ms=new MemoryStream(image_bytes);
Bitmap output=new Bitmap(ms);
output.Save(path,System.Drawing.Imaging.ImageFormat.Jpeg);
output.Dispose();
***************************************
我是循环从数据库里面取出image_bytes值,并一一生成相应的图片
程序执行的时候,只生存了第一张图片,然后提示“GDI+ 中发生一般性错误。”
这是怎一回事?》