Have a look at similar question with solution
How to convert image to pixel matrix in C#?[
^]
Convert Bmp image to matrix[
^]
from Reference link :-
public Color[][] GetBitMapColorMatrix(string bitmapFilePath)
{
bitmapFilePath = @"YourImage";
Bitmap b1 = new Bitmap(bitmapFilePath);
int hight = b1.Height;
int width = b1.Width;
Color[][] colorMatrix = new Color[width][];
for (int i = 0; i < width; i++)
{
colorMatrix[i] = new Color[hight];
for (int j = 0; j < hight; j++)
{
colorMatrix[i][j] = new Color();
colorMatrix[i][j] = b1.GetPixel(i, j);
}
}
return colorMatrix;
}