LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pnminterp

Enlarge PNM images by interpolation

TLDR

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

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
copy
sudo dnf install netpbm
copy
sudo pacman -S netpbm
copy
sudo apk add netpbm
copy
sudo zypper install netpbm
copy
brew install netpbm
copy
nix profile install nixpkgs#netpbm
copy

CAVEATS

Only integer scale factors. Part of Netpbm suite.

HISTORY

pnminterp was created as part of Netpbm for image interpolation.

SEE ALSO

Copied to clipboard
Kai