ppmmix

Blend two PPM images together

TLDR

Mix two images
$ ppmmix [factor] [image1.ppm] [image2.ppm] > [output.ppm]
50% blend
$ ppmmix 0.5 [a.ppm] [b.ppm] > [blend.ppm]
25% from first image
$ ppmmix 0.25 [a.ppm] [b.ppm] > [output.ppm]

SYNOPSIS

ppmmix fadefactor ppmfile1 ppmfile2

DESCRIPTION

ppmmix blends two PPM images together using the specified fade factor. The factor controls the contribution of each image: 0.0 produces entirely the first image, 1.0 produces entirely the second, and values between create a proportional blend.The fade factor is applied to brightness, not light intensity. This means a linearly increasing fade factor between a black and white image produces linearly increasing perceived brightness, but the actual light intensity increases faster at the bright end. For light-intensity-based mixing, use pamcomp instead.Both input images must have the same dimensions and the same maxval. Part of the Netpbm toolkit.

PARAMETERS

FADEFACTOR

Mixing factor (0.0-1.0). 0.0 produces entirely the first image, 1.0 produces entirely the second image.
PPMFILE1
First input PPM image.
PPMFILE2
Second input PPM image.

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

Both images must have the same dimensions and maxval. There are no ppmmix-specific options; it only recognizes common libnetpbm options.

HISTORY

ppmmix was created as part of Netpbm for image blending.

SEE ALSO

ppmfade(1), pamcomp(1), ppm(5)