PBMA_IO is a MATLAB library which reads or writes an ASCII Portable Bit Map file, involving an NROW by NCOL integer array containing bit map information (0 or 1).
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
PBMA_IO is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.
PBMA, a data directory which contains some example ASCII PBM files.
PGMA_IO, a MATLAB library which handles the ASCII Portable Gray Map format.
PPMA_IO, a MATLAB library which handles the ASCII Portable Pixel Map format.
You can go up one level to the MATLAB source codes.