Pixels for digits

Hi,

I'm needing a script (or whatever it takes) to convert a bitmap file in a Text file with a digit associated to each pixel. For example, a 3x3 pixel image with a black (1) square and a white (0) dot in the middle will be converted to a txt file with the following content:

111
101
111

If anybody could point me to any plugin or program that does it or could point how to do it... I'll be very grateful.

Thanks,
Felipe.

got nearly same problem and

got nearly same problem and solution in some way: rotate your picture by 90 degrees to the right and save it as .xpm file now rename the .xpm file into .txt its not that way you wanted, but its ok i think
Syndicate content