pnmfile
Display information about PNM image files
TLDR
Show image information
$ pnmfile [image.pnm]
Show info for multiple files$ pnmfile [file1.pnm] [file2.pnm]
Machine-readable output$ pnmfile -machine [image.pnm]
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.
INSTALL
sudo apt install netpbm
sudo dnf install netpbm
sudo pacman -S netpbm
sudo apk add netpbm
sudo zypper install netpbm
brew install netpbm
nix profile install nixpkgs#netpbm
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.
