LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pnmcomp

Composite PNM images with transparency

TLDR

Composite images
$ pnmcomp [overlay.pnm] [background.pnm] > [output.pnm]
copy
With alpha mask
$ pnmcomp -alpha=[mask.pgm] [overlay.pnm] [background.pnm] > [output.pnm]
copy
Position overlay
$ pnmcomp -xoff=[100] -yoff=[50] [overlay.pnm] [background.pnm] > [output.pnm]
copy

SYNOPSIS

pnmcomp [options] overlay background

DESCRIPTION

pnmcomp composites two PNM images by overlaying one on top of another with optional alpha transparency. An alpha mask (PGM file) controls the blending between overlay and background pixels.Position offsets (-xoff, -yoff) control where the overlay is placed on the background. Part of the Netpbm toolkit; superseded by pamcomp in newer versions.

PARAMETERS

OVERLAY

Foreground image.
BACKGROUND
Background image.
-alpha FILE
Alpha mask.
-xoff PIXELS
X offset.
-yoff PIXELS
Y offset.
-align POS
Alignment.

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

Part of Netpbm. Use pamcomp for newer version.

HISTORY

pnmcomp is part of Netpbm for image compositing.

SEE ALSO

pamcomp(1), pnmpaste(1), netpbm(1)

Copied to clipboard
Kai