Praca z tablicą będącą tak naprawdę bitmapą czarno-białą (lub raczej – w odcieniach szarości): zawierającą współrzędne x, y oraz wartość nasycenia.
Array bmpArr = Array.CreateInstance(typeof(Hue), bmp.Width, bmp.Height); for (int x = bmpArr.GetLowerBound(0); x <= bmpArr.GetUpperBound(0); x++) { for (int y = bmpArr.GetLowerBound(1); y <= bmpArr.GetUpperBound(1); y++) { int rgb = csrgb(bmp.GetPixel(x, y).R, bmp.GetPixel(x, y).G, bmp.GetPixel(x, y).B); //bmpArr.SetValue("abc" + x + y, x, y); Hue h = new Hue(csred(rgb), csgreen(rgb), csblue(rgb)); bmpArr.SetValue(h, x, y); } }