I guess this must be a well-known issue that I just hit my head on.
Color.Equals doesn't apply the usual equality test.
For example:
using (g = Graphics.FromImage(bmp))
g.FillRectangle(Brushes.Black, new Rectangle(Point.Empty, bmp.Size));
One might expect that for any (x, y) inside the image bounds,
bmp.GetPixel(x, y) == Color.Black
But it's not.
GetPixel returns an unnamed black color, while Color.Black returns a named
black color, and while the value is the same (0xff000000) they compare
unequal!
Anyone know a valid reason for this insanity before I post a bug on Connect?