public static void InvertColors(Bitmap bmp)
{
Color cSource;
Color cDest;
for (int y = 0; y < bmp.Height; y++)
{
for (int x = 0; x < bmp.Width; x++)
{
cSource = bmp.GetPixel(x, y);
cDest = Color.FromArgb(255 - cSource.R, 255 - cSource.G, 255 - cSource.B);
bmp.SetPixel(x, y, cDest);
}
}
}