LinuxCommandLibrary

st4topgm

Convert Sun rasterfile to PGM image format

TLDR

Convert an SBIG ST-4 file to a PGM file

$ st4topgm [path/to/input_file.st4] > [path/to/output.pgm]
copy

SYNOPSIS

st4topgm [st4file]
If st4file is not specified, st4topgm reads from standard input. The output is always written to standard output.

PARAMETERS

st4file
    The path to the input SoftImage ST4 file. If omitted, the command reads the ST4 data from standard input.

DESCRIPTION

st4topgm is a specialized utility from the Netpbm suite designed to convert image files from the SoftImage ST4 format into the Portable Graymap (PGM) format. SoftImage ST4 is an older, proprietary still picture file format primarily associated with SoftImage 3D animation software. The PGM format is a simple, grayscale image file format, which is part of the Netpbm family.

This command takes an ST4 file as input and outputs a grayscale PGM image, discarding any color information present in the original ST4 file. It's particularly useful for processing legacy SoftImage assets into a widely supported open format for further manipulation or viewing within the Netpbm ecosystem.

CAVEATS

Color information in the original ST4 file is completely discarded; the output is always a grayscale PGM image.
The output PGM always uses a maximum pixel value of 255 (8-bit depth), regardless of the bit depth or content of the input ST4 file.
This command processes an older, proprietary file format, reflecting its historical usage within the SoftImage ecosystem.

INPUT/OUTPUT

By default, st4topgm reads an ST4 file specified as an argument or from standard input if no file is provided. The resulting PGM image is always written to standard output. This allows for piping its output to other Netpbm tools or redirecting it to a file.

OUTPUT FORMAT

The command strictly outputs Portable Graymap (PGM) images. It does not support converting ST4 files into color formats like PPM, even if the ST4 source contains color data. The PGM output will have a maximum pixel value of 255, meaning it produces 8-bit grayscale images.

HISTORY

Part of the Netpbm project, which evolved from the PBMplus package initially released in 1991. st4topgm was developed to support the conversion of SoftImage ST4 files, a format prevalent during the 1990s and early 2000s in the 3D animation industry. Its inclusion in Netpbm reflects the suite's goal to provide comprehensive tools for converting between various image formats, including more obscure or proprietary ones.

SEE ALSO

pgm(5), pnm(5), netpbm(1), anytoppm(1)

Copied to clipboard