我喜欢让白色背景透明。然而,一些白人没有被删除。如何去除其他类似的白色?
我的代码-
string currentPath = Environment.CurrentDirectory;
int width = pictureBox1.Width;
int height = pictureBox1.Height;
Bitmap bm = new Bitmap(width, height);
pictureBox1.DrawToBitmap(bm, new System.Drawing.Rectangle(0, 0, width, height));
bm.MakeTransparent(System.Drawing.Color.White);
System.Drawing.Image img = (System.Drawing.Image)bm;
img.Save(currentPath + "\\temp\\logo.png", ImageFormat.Png);