generating arrays from bmp images?

Look into pbm file format, which the gimp can handle