0
我有两个图像,它们具有相同的大小。现在我需要删除图片1像素是黑色的BTMP使黑色像素透明
for (int c = 0; c < selFrame.Width; c++)
for (int j = 0; j < selFrame.Height; j++)
{
var pixel = selFrame.GetPixel(c, j);
var pixel2 = btmp.GetPixel(c, j);
if (pixel2.Equals(Color.Black) || pixel2.IsEmpty)
{
MessageBox.Show("qwe");
selFrame.SetPixel(c, j, Color.Transparent);
}
}
MessageBox中没有显示,那么这意味着它没有经过如果条件。
这里是BTMP