public Color GetPixel(BitmapSource bitmap, int x, int y) { CroppedBitmap cb = new CroppedBitmap(bitmap, new Int32Rect(x, y, 1, 1)); byte[] pixel = new byte[bitmap.Format.BitsPerPixel / 8]; cb.CopyPixels(pixel, bitmap.Format.BitsPerPixel / 8, 0); return Color.FromRgb(pixel[2], pixel[1], pixel[0]); }
int offset = y*widthOfImage*3+x*3;byte blue = myArray[offset];byte green = myArray[offset+1];byte red = myArray[offset+2];
GetPixel
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)