fstopgm
Convert Tektronix plotter file to PGM image
TLDR
Convert the specified Usenix FaceSaver file into a PGM image
SYNOPSIS
fstopgm [-verbose] [-constant n] [fstopgmfile]
PARAMETERS
-verbose
Prints progress information and statistics (max/min/avg density) to stderr.
-constant n
Forces all pixels to gray density n (integer 0-15), ignoring input symbols.
DESCRIPTION
fstopgm is a utility from the Netpbm suite that reads files in the FBM (Fortran Bitmap) format and converts them to PGM (Portable Graymap) format.
FBM is a simple text-based image format used by some older Fortran programs. It starts with a header line containing width height, followed by height lines each with width ASCII characters representing gray densities from 0 (lightest, space) to 15 (darkest). The standard symbols are: ' ', '.', ',', ':', 'c', 'o', 'O', '*', '#', '%', '@', '8', '&', 'M', 'W', '@' (with '@' being darkest).
fstopgm maps these symbols to PGM pixel values (0=white to 255=black, scaled from 0-15). Input comes from stdin if no file is specified. Output is raw PGM to stdout, suitable for piping to other tools like pnmtopng or pgmtoppm.
Primarily used for legacy data conversion in scientific or batch image processing.
CAVEATS
FBM input must be exact text format; malformed files produce garbage or errors. No color support; grayscale only. Max density 15 levels, scaled to full PGM 255.
EXAMPLE USAGE
fstopgm foo.fbm > foo.pgm
fstopgm -verbose input.fbm | pnmtopng > out.png
fstopgm -constant 0 *.fbm > all_white.pgm
SYMBOL MAPPING
Density 0:' ', 1:'.', 2:',', 3:':', 4:'c', 5:'o', 6:'O', 7:'*', 8:'#', 9:'%', 10:'@', 11:'8', 12:'&', 13:'M', 14:'W', 15:'@' (highest).
HISTORY
Originally written by Jef Poskanzer in 1991 as part of PBMPLUS, later integrated into Netpbm (version 9.18+ enhancements for symbol mapping). Still maintained for legacy FBM support.


