pnminterp

Enlarge PNM images by interpolation

TLDR

Interpolate image (scale up)
$ pnminterp [factor] [input.pnm] > [output.pnm]
Double image size
$ pnminterp 2 [input.pnm] > [output.pnm]
Triple image size
$ pnminterp 3 [input.pnm] > [output.pnm]

SYNOPSIS

pnminterp n [file]

DESCRIPTION

pnminterp enlarges PNM images by an integer factor using bilinear interpolation. Unlike simple pixel replication (as done by pnmenlarge), interpolation produces smoother results by computing weighted averages of neighboring pixels.The scaling factor must be a positive integer, producing an output image that is N times larger in each dimension. This tool is a simplified interface to pamscale's interpolation mode. Part of the Netpbm toolkit; superseded by pamscale.

PARAMETERS

N

Scaling factor (integer multiplier).
FILE
Input PNM file.

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 integer scale factors. Part of Netpbm suite.

HISTORY

pnminterp was created as part of Netpbm for image interpolation.

SEE ALSO

pamscale(1), pnmscale(1), pamenlarge(1)