public void ChangeColorToGrayScale() { int i = ThreadService.GetI(); while (i < Pixels.Length) { ProcessingMethod(Pixels.GetRed(i), Pixels.GetGreen(i), Pixels.GetBlue(i)); i = ThreadService.GetI(); } }