PBMLIB - Portable Bit Maps
PBMLIB is a collection of FORTRAN routines
for creating and reading Portable Bit Map files (PBM). Both ASCII
and binary formats are supported. The library can also handle
the related Portable Gray Map (PGM) and Portable Pixel Map (PPM)
formats.
There are many graphics programs, such as XV and GIMP, that can
display images in these formats, or translate them to other formats
such as BMP, GIF, JPEG, MacPaint, X Window, and so on.
A C version of PBMLIB is available in
PBMPAK.
PPMA_2_PPMB is a sample application that converts ASCII PPM files
to binary PPM files.
Files you may copy include:
Graphics files you may copy include:
-
test01.pbm, the ASCII PBM sample file.
-
test02.pgm, the ASCII PGM sample file.
-
test03.ppm, the ASCII PPM sample file.
-
test04.pbm, the binary PBM sample file.
-
test05.pgm, the binary PGM sample file.
-
test06.ppm, the binary PPM sample file.
-
test17.ppm, an ASCII PPM file which
exhibits the behavior of Newton's method in the complex plane
(this file DELETED because it's too big to store).
The list of routines includes:
-
BITCHR75 returns a 7 by 5 bit pattern for a given character.
-
CH_CAP capitalizes a single character.
-
FONT_DATA prints out a FORTRAN DATA version of a simple bit map font.
-
FONT_PRINT prints out a text version of a simple bit map font.
-
FONT_READ reads simple ASCII data defining a bit map font.
-
GETINT reads an integer from a file.
-
GET_UNIT returns a free FORTRAN unit number.
-
IVEC_TO_SVEC converts an array of integers into an array of characters.
-
PBM_CHECK_DATA checks bit data.
-
PBMA_READ reads an ASCII portable bit map file.
-
PBMA_WRITE writes an ASCII portable bit map file.
-
PBMB_READ reads a binary portable bit map file.
-
PBMB_WRITE writes a binary portable bit map file.
-
PGM_CHECK_DATA checks gray data.
-
PGMA_READ reads an ASCII portable gray map file.
-
PGMA_WRITE writes an ASCII portable gray map file.
-
PGMB_READ reads a binary portable gray map file.
-
PGMB_WRITE writes a binary portable gray map file.
-
PPM_CHECK_DATA checks pixel data.
-
PPMA_READ reads an ASCII portable pixel map file.
-
PPMA_WRITE writes an ASCII portable pixel map file.
-
PPMB_READ reads a binary portable pixel map file.
-
PPMB_WRITE writes a binary portable pixel map file.
-
S_BLANKS_DELETE replaces consecutive blanks by one blank.
-
S_CHOP "chops out" a portion of a string, and closes up the hole.
-
S_EQI is a case insensitive comparison of two strings for equality.
-
S_TO_I reads an integer value from a string.
-
SVEC_TO_IVEC converts an array of characters into an array of integers.
-
WORD_NEXT_RD "reads" words from a string, one at a time.
Back to the graphics software page.
Last revised on 12 April 2002.