The
Bitmap[
^] you are creating with
Bitmap newBitmap = new Bitmap(img.Width, img.Height);
has a default black background. So all the values in your 2D array will be 0.
Before you start checking for colour you will need to place a colour picture in your bitmap.
Notes:
1 - Remove
Convert.ToByte[
^] from
int lumi = Convert.ToByte((int)(c.R*0.3 + c.G*0.59 + c.B*0.11));
it serves no purpose.
2 - Your program will crash if either
img.Width
or
img.Height
is larger then 100.