creating a 2 dimesion array from a sdcard text file

Goodday,
I am working on a led pattern blink array using shift register. I have 8 shift register daisychained.
The circuit works using a 2 dimension array.

I am currently working on the following code from:

this is to add sdcard support to the project of that i can update the led blink pattern via sdcard.

my sample.txt file contains:

B11110000, B00001111, B00011100, B11000000, B10101110, B10111010, B00000000, B00000000,
B11111111, B11111111, B11100011, B01000110, B11001111, B00000110, B10010111, B00001101,
B10101011, B00011001, B10011001, B10010101, B01000001, B11000000, B11010101, B11100101,

I modified the code to read only but i couldnot get rid of the conversion
array*[j] = strtol(str, &ptr, 10);*
to accept data as above.
Can someone point me a direction, as I am newbie to data conversion.

Post your code.