LinuxCommandLibrary

pbmtocmuwm

Convert PBM image to CMU Window Manager bitmap

TLDR

Convert a PBM image to a CMU window manager bitmap

$ pbmtocmuwm [path/to/image.pbm] > [path/to/output.bmp]
copy

SYNOPSIS

pbmtocmuwm [-name name] [-compact] [pbmfile]

PARAMETERS

-name name
    Specifies the name of the bitmap variable to be used within the output file. This name acts as an identifier for the bitmap data. If this option is not provided, the default name used is 'stdin'.

-compact
    Instructs the command to generate a more compact representation of the bitmap data in the output. This format can be particularly beneficial when the output is intended to be piped to other utilities, such as xsetroot, which might prefer or require this more concise representation for efficient processing.

DESCRIPTION

pbmtocmuwm is a specialized command-line utility from the Netpbm suite designed to convert a Portable Bitmap (PBM) image into a CMU window manager (CMUWM) format bitmap file.

The CMUWM bitmap format is primarily utilized by the wm window manager (the original CMU window manager) and various older X applications for displaying graphical elements such as icons and cursors. Fundamentally, this output format is nearly identical to the widely used X11 XBM (X Bitmap) format, with the key difference lying in the header structure.

The command reads the PBM image data from standard input by default, or from a specified input file if provided. The resulting CMUWM bitmap data is then written to standard output, making it suitable for piping to other commands or redirecting to a file.

CAVEATS

The CMU window manager bitmap format generated by pbmtocmuwm is very similar to the X11 XBM format, with the primary distinction being the header. For general conversions to XBM for broader X11 application compatibility, the pbmtoxbm command from the Netpbm suite might be a more direct and appropriate tool.

INPUT AND OUTPUT

The command expects a PBM image as input. If no specific pbmfile is provided as an argument, it reads the PBM data from standard input (stdin). The processed CMUWM bitmap output is always written to standard output (stdout), allowing for flexible redirection or piping to other commands.

USAGE CONTEXT

This command finds its primary utility in environments still utilizing the original CMU window manager or when dealing with legacy X applications that might have specific dependencies on or preferences for the CMUWM bitmap format for displaying icons, cursors, or root window backgrounds. Modern X11 applications typically prefer the XBM format, which pbmtoxbm handles.

HISTORY

pbmtocmuwm is an integral part of the Netpbm package, a comprehensive and long-standing suite of graphics file format conversion tools for Unix-like systems. Its development was driven by the specific bitmap requirements of the CMU window manager, which was a significant windowing environment in its time. Like many tools within the Netpbm collection, pbmtocmuwm adheres to the Unix philosophy of creating small, focused utilities that perform a single task efficiently, designed to be chained together via pipes.

SEE ALSO

pbm(5), pbmtoxbm(1), xsetroot(1), netpbm(1)

Copied to clipboard