PBMLIB
Portable Bit Maps
PBMLIB
is a FORTRAN90 library which
creates and reads Portable Bit Map files (PBM).
Both ASCII
PBMA and binary PBMB formats are supported. The library can also handle
the related Portable Gray Map (PGMA and PGMB) and Portable Pixel Map
(PPMA and PPMB) 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.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
PBMLIB is available in
a C version and
a FORTRAN90 version.
Related Data and Programs:
PBMA,
a data directory which
contains examples and a description
of the ASCII Portable Bit Map graphics file format.
PBMA_IO,
a FORTRAN90 library which
can read or write ASCII PBM (black/white) graphics files.
PGMA,
a data directory which
contains examples and a description
of the ASCII Portable Grayscale Map graphics file format.
PGMA_IO,
a FORTRAN90 library which
can read or write ASCII PGM (grayscale) graphics files.
PPMA,
a data directory which
contains examples and a description
of the ASCII Portable Pixel Map graphics file format.
PPMA_IO,
a FORTRAN90 library which
can read or write ASCII PPM (RGB color) graphics files.
Reference:
-
the NETPBM homepage.
Source Code:
Examples and Tests:
List of Routines:
-
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.
-
HEXCOL returns a color on the perimeter of the color hexagon.
-
I4VEC_TO_S converts an array of integers into a string.
-
PBM_CHECK_DATA checks bit data.
-
PBM_EXAMPLE sets up data for a PBM file.
-
PBMA_READ reads an ASCII portable bit map file.
-
PBMA_READ_DATA reads the data from an ASCII PBM file.
-
PBMA_READ_HEADER reads the header of an ASCII PBM 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.
-
PGM_EXAMPLE sets up sample PGM data.
-
PGMA_READ reads an ASCII portable gray map file.
-
PGMA_READ_DATA reads the data in an ASCII portable gray map file.
-
PGMA_READ_HEADER reads the header of 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.
-
PPM_EXAMPLE sets up sample PPM 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.
-
RT_TO_XY converts polar coordinates to XY coordinates.
-
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_I4 reads an I4 from a string.
-
S_TO_I4VEC converts an string of characters into an I4VEC.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
WORD_NEXT_RD "reads" words from a string, one at a time.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 03 September 2005.