I'm looking to do this in Bash, if possible. The bitmap image in question is 64x64, and only contains black and white pixels, nothing in between. I'm trying to write a script in bash that can somehow read the image, and return either a 1 for white, and a 0 for black, for each pixel in the image. So, the output would look something like this:
01001001010001010101010...
Can this be done in Bash? If so, can some example code be given?