悬赏分:20 浏览:1270 次
|
代码好像还没见过,但是可以用第三方的图片处理控件,封装了专注用于处理图片的方法, C#中的GDI+好像都是按照位图的方式在处理图片,直接操作GIF没有用过也,可以尝试使用第三方图片操作的组件 jquery Bitmap bt = Image.FromFile("c:\a.gif"); Bitmap gifBt = new Bitmap(bt.Width,bt.Height); Graphics gifGra = Graphics.FromImage(gifBt); gifGra.Clear(ColorTranslator.FromHtml("#00FF00")); gifGra.DrawImage(bt,new Rectangle(0,0,gifBt.Width,gifBt.Height),0,0,bt.Width,bt.Height,GraphicsUnit.Pixel); string gifFile = Server.MapPath(Constant.LocalTmp + saveFileName + ".gif") ; gifBt.Save(gifFile,System.Drawing.Imaging.ImageFormat.Gif); gifBt.Dispose(); 把 “00FF00” 就透明 。。。 不过做完总会有一些锯齿。。 |