If I try your code with one of my own images and add a counter and supporting code:
Color NewColor = Color.FromArgb(1, 1, 155, 100);
Color co;
int wid = pictureBox1.Width;
int hig = pictureBox1.Height;
int cnt = 0;
for (i = 0; i < wid; i++)
{
for (j = 0; j < hig; j++)
{
co = ((Bitmap)pictureBox1.Image).GetPixel(i, j);
if (co.R == 255 && co.G == 255 && co.B == 255)
{
((Bitmap)pictureBox1.Image).SetPixel(i, j, NewColor);
cnt++;
}
}
}
Then I get what I expected: unnoticeable changes to the image because the counter ends up as 3 - indicating only three white pixels were found in the whole image.
Given that the image was of a black and white cat in a garden that's about what I would expect to get - very little in a photo is ever "pure white": at least one of the R G or B parts will be at least one smaller!
Indeed, if I change the code so it only compares the red portion with 255 the counter only rises to 60!
Use the debugger and check what exactly is happening: I think you will find there is almost no matches in your image.
I'd also change your code to make it more readable:
Color newColor = Color.FromArgb(1, 1, 155, 100);
Bitmap picture = (Bitmap) pictureBox1.Image;
int cnt = 0;
for (int i = 0; i < picture.Width; i++)
{
for (int j = 0; j < picture.Height; j++)
{
Color co = picture.GetPixel(i, j);
if (co.R == 255 && co.G == 255 && co.B == 255)
{
picture.SetPixel(i, j, newColor);
cnt++;
}
}
}