LinuxCommandLibrary

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.

CAVEATS

Only integer scale factors. Part of Netpbm suite.

HISTORY

pnminterp was created as part of Netpbm for image interpolation.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community