private int getN(spector sp, int x, int y) { int d = 0; try { switch (sp) { case spector.blue: d = (Bit.GetPixel(x, y).B); if (d >= 170) { d = 0; } return(d); case spector.red: d = (Bit.GetPixel(x, y).R); if (d >= 170) { d = 0; } return(d); case spector.green: d = (Bit.GetPixel(x, y).G); if (d >= 170) { d = 0; } return(d); default: return(0); } } catch { return(d); } }