LinuxCommandLibrary

pamenlarge

enlarges an image by an integer factor using pixel replication

TLDR

Enlarge image 2x

$ pamenlarge 2 [input.pam] > [output.pam]
copy
Enlarge image 4x
$ pamenlarge 4 [input.pam] > [output.pam]
copy
Enlarge with different x/y factors
$ pamenlarge -xscale [3] -yscale [2] [input.pam] > [output.pam]
copy

SYNOPSIS

pamenlarge [options] factor [pamfile]

DESCRIPTION

pamenlarge enlarges an image by an integer factor using pixel replication. Each pixel becomes a factor×factor block of identical pixels.
This produces a blocky/pixelated look, useful for pixel art or simple scaling. For smooth scaling, use pamscale instead.

PARAMETERS

factor

Scale factor (integer).
-xscale n
Horizontal scale factor.
-yscale n
Vertical scale factor.

EXAMPLE

$ # Double the size
pamenlarge 2 small.ppm > large.ppm

# Triple horizontal, double vertical
pamenlarge -xscale 3 -yscale 2 input.ppm > output.ppm
copy

COMPARISON

$ pamenlarge - Fast, integer factors, blocky
pamscale   - Smooth scaling, any factor
copy

CAVEATS

Integer factors only. No interpolation. Large factors create big files quickly.

HISTORY

pamenlarge is part of Netpbm, providing simple image magnification through pixel replication.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community