日期:2014-05-17  浏览次数:20414 次

为什么用asp.net远程下载的qq表情gif动画不能播放
为什么用asp.net远程下载的qq表情gif动画不能播放,而右击另存为就可,请各位大侠指点!!

------解决方案--------------------
oImage.Save(path, System.Drawing.Imaging.ImageFormat.Jpeg);
 改成
oImage.Save(path, System.Drawing.Imaging.ImageFormat.Gif);
 
------解决方案--------------------
System.Drawing.Image并不支持动画gif,你把人家gif扔到这个里边,就变成单帧的位图了。

如果要下载人家的文件,使用一句 new WebClient().DownloadFile 或者 new WebClient().DownloadData 就搞定了,直接保存人家的源文件数据。不要搞什么 System.Drawing.Image。