icontopbm
Convert X Window System icon files to PBM
TLDR
View documentation for the current command
SYNOPSIS
icontopbm [inputfile]
DESCRIPTION
icontopbm is a utility from the Netpbm family of graphics conversion tools. Its primary function is to transform a binary X11 icon file (typically with a `.icon` extension) into a Portable BitMap (PBM) image format.
X11 icon files are specific binary structures used in the X Window System for representing small graphic elements. The resulting PBM file is a simple, monochrome (black and white) image format that is widely portable and easily manipulated by other Netpbm tools, such as `pbmscale` or `pbmtoascii`.
This command is often used as part of a larger image processing pipeline to extract and convert X11 icons for further viewing, editing, or integration into different image contexts.
CAVEATS
Input must be a valid X11 icon file. The command does not support other icon formats (e.g., Windows ICO).
The output PBM format is strictly monochrome. If the original X11 icon contains color information, it will be converted to black and white, potentially losing fidelity or undergoing a default dithering process.
INPUT/OUTPUT HANDLING
By default, icontopbm reads its input from standard input if no inputfile is specified. The resulting PBM image is always written to standard output. This behavior makes it ideal for use in shell pipelines, allowing its output to be directly piped as input to other commands (e.g., `icontopbm icon.x11 | pbmtopng > icon.png`).
PORTABILITY OF PBM
The choice of PBM as the output format ensures maximum portability. PBM is a very simple and well-documented format, making it easy for other programs to read and process. It serves as a good intermediate format for conversion to more complex image types like PNG, JPEG, or GIF using other Netpbm utilities.
HISTORY
icontopbm is an integral part of the Netpbm project, which originated from the PBMplus package created by Jef Poskanzer. Netpbm is a long-standing and widely used toolkit for handling graphics formats on Unix-like systems. icontopbm specifically addresses the niche need of converting X11-specific icon files, reflecting the package's comprehensive approach to image format interoperability in the Unix environment.