看看是不是很简单?
void
MakeBackgroundTransparent(Bitmap img)
{
Color pixel = img.GetPixel( 0 , img.Height - 1 );
img.MakeTransparent();
Color color = Color.FromArgb( 0 , pixel);
img.SetPixel( 0 , img.Height - 1 , color);
}
{
Color pixel = img.GetPixel( 0 , img.Height - 1 );
img.MakeTransparent();
Color color = Color.FromArgb( 0 , pixel);
img.SetPixel( 0 , img.Height - 1 , color);
}
如果你有更好的方法,请不吝赐教!