LinuxCommandLibrary

ppmtospu

Convert PPM image to Subpicture Unit format

TLDR

Convert a PPM file to an Atari Spectrum 512 image

$ ppmtospu [path/to/input.ppm] > [path/to/output.spu]
copy

Use a dithering matrix of the specified size (0 means no dithering)
$ ppmtospu -d[0|2|4] [path/to/input.ppm] > [path/to/output.spu]
copy

SYNOPSIS

ppmtospu [options] [ppmfile]

PARAMETERS

-gamma N
    Applies gamma correction to the image. N specifies the gamma value to use (e.g., 2.2).

-aspect N
    Adjusts the aspect ratio of the output image to the specified value N.

-colors N
    Reduces the number of colors in the output SPU image to N. The default is typically 256 colors, relevant for the PlayStation's color capabilities.

-maxval N
    Sets the maximum pixel value for the output SPU image. The default is usually 255, corresponding to 8-bit color depth.

-noantialias
    Disables antialiasing during the conversion process, which can result in sharper but potentially jagged edges in the output.

-notexture
    Instructs the command not to generate texture data in the output SPU file, potentially reducing file size or adapting to specific SPU usage.

-printer
    Generates a slightly different SPU format optimized for printing rather than on-screen display on the console.

-outfilename NAME
    Specifies the name of the output SPU file. If this option is not provided, the converted SPU image is written to standard output.

ppmfile
    The input PPM image file to be converted. If omitted, ppmtospu reads the PPM data from standard input.

DESCRIPTION

ppmtospu is a command-line utility from the Netpbm suite designed to convert image files from the PPM (Portable Pixmap) format into the SPU (Sony PlayStation Unit) image format.

The SPU format was an internal graphics format primarily used for rendering images and textures on the original Sony PlayStation console. This command was useful for developers or enthusiasts creating graphics for PlayStation applications or games.

It reads a PPM image from standard input or a specified file and writes the resulting SPU image to standard output or a specified output file. The command offers various options to control aspects like color depth, gamma correction, and output file specifics.

CAVEATS

This program is largely obsolete today as the Sony PlayStation is an old system and its internal graphics formats are no longer in common use. Its primary utility was strictly tied to the console's active development and usage period (mid-1990s to early 2000s).

HISTORY

ppmtospu is an integral part of the Netpbm project, a robust and widely used suite of graphics file format converters and editors for Unix-like operating systems. The origins of the Netpbm tools trace back to the pbmplus package developed in the early 1990s. ppmtospu itself gained specific relevance and development during the active lifespan of the original Sony PlayStation console (from the mid-1990s into the early 2000s) as it addressed the need for converting standard image formats into the PlayStation's proprietary SPU graphics format for game and application development.

SEE ALSO

ppm(5), spu(5), pnm(5), netpbm(1)

Copied to clipboard