public static byte[] Disassemble(byte[,] arr)
{
byte[] result = new byte[arr.Length];
int width = arr.GetLength(0);
int height = arr.GetLength(1);
for(int y = 0; y < width; y++)
for(int x = 0; x < height; x++)
{
result[y*width+x] = arr[x,y];
}
return result;
}