LinuxCommandLibrary

sunicontopnm

Convert Sun rasterfile to portable bitmap

TLDR

Convert a Sun icon into a Netpbm image

$ sunicontopnm [path/to/input.ico] > [path/to/output.pbm]
copy

SYNOPSIS

sunicontopnm [iconfile]

PARAMETERS

iconfile
    The path to the Sun icon file to convert. If this argument is omitted, sunicontopnm reads the Sun icon data from standard input.

-headerdump
    This is a common Netpbm option. When specified, sunicontopnm prints information about the header of the input file to standard error and then exits, without performing the actual image conversion. Useful for debugging or inspecting file metadata.

-help
    This is a common Netpbm option. Displays a concise help message detailing the command's usage and available options to standard output, then exits.

DESCRIPTION

sunicontopnm is a utility from the Netpbm package designed to convert Sun icon files into the portable anymap (PNM) image format. Sun icon files are a specific image format, typically found on SunOS/Solaris systems, used for small graphical elements such as desktop icons.

The PNM format is a family of simple, raw image formats (PBM for black & white, PGM for grayscale, and PPM for color) that serve as a common intermediary format within the Netpbm suite. sunicontopnm reads the input Sun icon data, either from a specified file or from standard input, and outputs the corresponding PNM image to standard output. This makes it particularly useful in shell pipelines, allowing users to convert legacy Sun icon files into a format that can then be processed further by other Netpbm tools or converted to more widely used modern image formats like PNG or JPEG.

CAVEATS

sunicontopnm is specifically designed for Sun icon files; it will not correctly process other image formats. Malformed or corrupted Sun icon input may lead to errors or unpredictable output. The output is always written to standard output, necessitating redirection (e.g., > output.pnm) or piping to another command (e.g., | pnmtopng) for practical use.

TYPICAL USAGE

As with many Netpbm tools, sunicontopnm is frequently used in a pipeline to convert and further process image data.

Example 1: Converting a Sun icon file to a PNM file.
sunicontopnm myicon.ic > myimage.pnm

Example 2: Converting a Sun icon file directly to a PNG image using a pipe.
sunicontopnm myicon.ic | pnmtopng > myimage.png

Example 3: Reading from standard input and converting to a GIF.
cat myicon.ic | sunicontopnm | pnmtopng | pngtogif > myimage.gif

HISTORY

sunicontopnm is an integral part of the Netpbm package, a powerful and venerable suite of graphics utilities. Netpbm originated from the Pbmplus package, developed by Jef Poskanzer in the late 1980s. Its evolution into Netpbm, led by Bryan Henderson, broadened its scope to include converters for a vast array of image formats, both common and obscure. The inclusion of sunicontopnm highlights Netpbm's commitment to interoperability and preserving the ability to work with legacy data formats, such as the Sun icon format prevalent on older SunOS and Solaris systems.

SEE ALSO

pnm(5), anytopnm(1), pnmtopng(1), pnmtojpeg(1), netpbm(1)

Copied to clipboard