I am trying to rotate two% nested%. The second would like it to be parallel. Follow my code.
for (int i = 0; i < original.Width; i++)
{
Parallel.For(0, original.Height, j =>
{
Color originalColor = original.GetPixel(i, j);
Color CorEmNegativo = Color.FromArgb(255 - originalColor.R, 255 - originalColor.G, 255 - originalColor.B);
alterado.SetPixel(i, j, CorEmNegativo);
Thread.Sleep(100);
});
}
The following error is returning to me: for
How can I do this?