LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pnmfile

Display information about PNM image files

TLDR

Show image information
$ pnmfile [image.pnm]
copy
Show info for multiple files
$ pnmfile [file1.pnm] [file2.pnm]
copy
Machine-readable output
$ pnmfile -machine [image.pnm]
copy

SYNOPSIS

pnmfile [options] [files]

DESCRIPTION

pnmfile displays information about PNM image files including the format type (PBM, PGM, or PPM), dimensions (width and height), maximum sample value, and whether the file uses ASCII (plain) or binary (raw) encoding.The -machine flag outputs in a parseable format suitable for scripting. Part of the Netpbm toolkit; superseded by pamfile, which also handles PAM format files.

PARAMETERS

FILES

Input PNM files.
-machine
Machine-readable output format, printing type, width, height, depth, and maxval as space-separated values.

CAVEATS

Only reads PNM format files (PBM, PGM, PPM). For PAM files, use pamfile instead.

HISTORY

pnmfile was created as part of the Netpbm toolkit for image inspection. It has been largely superseded by pamfile.

SEE ALSO

pamfile(1), file(1), identify(1), pnmtopng(1), pnmtojpeg(1)

Copied to clipboard
Kai