LinuxCommandLibrary

lispmtopgm

Convert Lisp Machine bitmap to PGM image

TLDR

Convert the specified Lisp Machine bitmap file into a PGM image

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

SYNOPSIS

lispmtopgm [-alpha] [-cmap] [-invert] [-text] [-verbose] [-width=width] [-height=height] [bitmapfile]

PARAMETERS

-alpha
    Converts the bitmap as an alpha map, taking pixels from the alpha channel.

-cmap
    Prints the color map table to standard output for debugging purposes.

-invert
    Inverts the image colors, turning white pixels black and black pixels white.

-text
    Prints any embedded text content from the bitmap file to standard output for debugging.

-verbose
    Displays detailed debugging information to standard error.

-width=width
    Explicitly sets the output image width. Useful if the file header is incorrect or missing.

-height=height
    Explicitly sets the output image height. Useful if the file header is incorrect or missing.

DESCRIPTION

lispmtopgm is a utility that converts a Lisp Machine bitmap file into a Portable Graymap (PGM) image. It processes the specific bitmap format documented in the Lisp Machine Window System Manual. The command expects a black and white input image and generates a PGM file where black pixels become 0 and white pixels become 1, with a maximum pixel value of 1. This tool is especially useful for handling legacy image data originating from Lisp Machine environments. Input can be provided from a specified bitmapfile or, if no file is named, from standard input.

CAVEATS

lispmtopgm is designed for a specific, older Lisp Machine bitmap file format. It expects black and white input images. If the input file's header is missing or malformed, you may need to explicitly specify the image dimensions using the -width and -height parameters.

OUTPUT FORMAT

lispmtopgm always produces a Portable Graymap (PGM) file. The output PGM will have a maximum pixel value (maxval) of 1, where 0 represents black pixels and 1 represents white pixels.

INPUT SOURCE

The command can read the Lisp Machine bitmap data from a specified bitmapfile. If no filename is provided, it defaults to reading the bitmap data from standard input.

HISTORY

lispmtopgm is an integral part of the comprehensive Netpbm image manipulation toolkit. The Netpbm project evolved from the pbmplus package, which emerged in the late 1980s as a suite of tools for converting various image formats to and from portable formats (PBM, PGM, PPM). lispmtopgm was developed to specifically address the niche bitmap format produced by Lisp Machines, highlighting the enduring need to process and interoperate with data from these historic computing environments. Its inclusion in Netpbm ensures continued compatibility with this specialized format.

SEE ALSO

pbmtopgm(1), pbmtoppm(1), pgm(5), pbm(5), ppm(5), netpbm(1)

Copied to clipboard