LinuxCommandLibrary

pgmtolispm

Convert PGM image to Lisp list

TLDR

Convert the specified PGM image to Lisp Machine format

$ pgmtolispm [path/to/input.pgm] > [path/to/output.lispm]
copy

SYNOPSIS

pgmtolispm [pgmfile]
If pgmfile is omitted, pgmtolispm reads the PGM image from standard input. The converted Lisp Machine bitmap is always written to standard output.

PARAMETERS

pgmfile
    The path to the Portable GreyMap (PGM) image file to be converted. If this argument is not provided, pgmtolispm will read the PGM data from standard input.

DESCRIPTION

pgmtolispm is a specialized command-line utility from the Netpbm suite. Its primary function is to convert images in the Portable GreyMap (PGM) format into the Lisp Machine bitmap format. PGM is a simple, grayscale image format, while the Lisp Machine bitmap is an older, niche format used by Lisp Machines. These were specialized computers designed to run Lisp programming environments. This tool is particularly useful for users working with legacy Lisp Machine systems or historical computing environments, allowing them to prepare grayscale images for display or processing on such platforms. It typically reads a PGM image from standard input or a specified file and writes the resulting Lisp Machine bitmap to standard output. As part of the Netpbm toolkit, it often operates in conjunction with other Netpbm utilities via pipes, enabling complex image manipulation workflows.

CAVEATS

This command converts only grayscale images (PGM format). Any color information in the input will be lost. The Lisp Machine bitmap format is an outdated and highly specialized format, not commonly used in modern computing environments. The command's design relies on standard input and output, making it suitable for piping but requiring redirection for direct file-to-file conversions.

STANDARD INPUT/OUTPUT

pgmtolispm is designed to be used effectively in a Unix pipeline. It reads PGM data from standard input (stdin) if no pgmfile is provided as an argument, or from the specified file. The resulting Lisp Machine bitmap data is always written to standard output (stdout). This design allows for chaining commands, for example, cat input.pgm | pgmtolispm > output.lispbitmap.

HISTORY

pgmtolispm is an integral part of the Netpbm project, an open-source graphics toolkit. The Netpbm suite, originally known as PBMPLUS, was initiated by Jef Poskanzer in the late 1980s. The inclusion of tools for Lisp Machine format conversion reflects the historical importance of Lisp Machines in specialized computing contexts during that era. The command has been maintained within the Netpbm suite for compatibility and to preserve its functionality for historical and legacy systems.

SEE ALSO

pbm(5), pgm(5), netpbm(1), convert(1)

Copied to clipboard