LinuxCommandLibrary

pnmtoplainpnm

Convert PNM image to plain PNM format

TLDR

View documentation for the original command

$ tldr pamtopnm
copy

SYNOPSIS

pnmtoplainpnm [pnmfile]

DESCRIPTION

pnmtoplainpnm reads a PNM (Portable Anymap) image from standard input or a specified file and converts it to its plain (ASCII) format. The input can be a PBM (Portable Bitmap), PGM (Portable Graymap), or PPM (Portable Pixmap) file. The output will correspond to the input type (e.g., PBM to plain PBM, PGM to plain PGM, PPM to plain PPM).

Plain PNM files are represented using human-readable ASCII characters, making them suitable for inspection, debugging, or use with tools that expect text-based input. In contrast, "raw" PNM files are binary, generally smaller, and faster for machine processing. This command effectively transforms the binary raw format into its text-based equivalent, or ensures a text-based format if the input was already plain.

SEE ALSO

rawtopnm(1), pnm(5)

Copied to clipboard