You need een PBM file of the ASCII type. You can recognize these by looking at the first line. This holds P1, P2, or P3 (P4, P5 or P6 for binary PBM files). You need a P1 variant.
Assume you start with a tiff file, than the following magic is required to make a PBM file:
convert -monochrome xxx.tiff xxx.pbm pnmnoraw xxx.pbm > xxx_ascii.pbmConvert is part of the Image Magik package, pnmnoraw is part of the pbn plus package. Ask your system manager about these software packages (or alternatives) if it is not installed on your machine.