Bitmap b = new Bitmap(@"D:\as.jpg"); b.MakeTransparent(System.Drawing.Color.White); b.Save("d:\\haha.jpg");
添加:
using System.Drawing;
wpf需要添加引用System.Drawing.dll。
上面实例就是把图片中的白色变为透明色。