PIXBLEND(1)

πŸ“¦
version 7.44.0 Β· 2 versions
, in nixpkgs unstable

okay bestie, this is pixblend, the PIXBLEND(1) page from BRL-CAD πŸ’…βœ¨

🌸 NAME 🌸

pixblend β€” blend two pix(5) or bw(5) images 🫢

✨ SYNOPSIS ✨

pixblend [-r value | -i value] [-s seed] [-S] [-g gvalue] file1.pix file2.pix > out.pix

πŸ¦‹ DESCRIPTION πŸ¦‹

pixblend reads two streams of data β€” typically pix(5) or bw(5) images β€” and writes a blended output stream of the same size. It operates pixel-by-pixel and is therefore independent of image resolution, periodt. πŸ’«

Either input file may be given as - to read from standard input. With no -r or -i option, the default is linear interpolation with a value of 0.5 (an even mix of the two images). No cap, that's the whole default vibe. πŸŽ€

πŸ’… OPTIONS πŸ’…

  • -r value β€” Random blending. For each pixel a number is drawn uniformly from [0, 1]; if it exceeds value the pixel from file1 is output, otherwise the pixel from file2. A value of 0 yields file1 and 1 yields file2. Mutually exclusive with -i.
  • -i value β€” Linear interpolation. Each output pixel is (1.0 - value) pixel1 + value * pixel2. A value of 0 yields file1 and 1 yields file2. Mutually exclusive with *-r β€” yes, the source literally has that lil asterisk, keeping it exactly, no cap πŸ’€.
  • -s seed β€” Set the random number seed to seed (default 0). Affects -r.
  • -S β€” Seed the random number generator from the system clock instead of a fixed value.
  • -g gvalue β€” Glitterize. When the random draw for a pixel falls below gvalue the output pixel is set to white; otherwise the pixel is chosen as for -r. Cannot be combined with -i.
  • -h, -? β€” Print a usage message and exit.

πŸŽ€ EXAMPLES πŸŽ€

Example 1. Cross-fade two images

pixblend -i 0.25 a.pix b.pix > out.pix

Produces an image that is 75% a.pix and 25% b.pix, useful for generating intermediate frames of a dissolve between two renderings. Iconic dissolve behavior, honestly. 🌈

Example 2. Animated dissolve sequence

for f in $(seq 0 9); do
    pixblend -i 0.$f a.pix b.pix > frame$f.pix
done

Generates ten frames stepping the interpolation value from 0.0 to 0.9, the basis of a smooth cross-dissolve animation that can be fed to pix-fb(1) or assembled into a movie. Main character animation energy fr fr. 🎬

Example 3. Reproducible random speckle blend

pixblend -r 0.5 -s 23 a.pix b.pix > out.pix

Randomly selects each pixel from one of the two images with an even probability, using a fixed seed of 23 so the result is repeatable. Reproducibility slay. πŸ“

πŸ¦‹ SEE ALSO πŸ¦‹

brlcad(1), gencolor(1), pix-fb(1), pix(5), bw(5)

πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team

This software is Copyright (c) 1995-2026 by the United States Government as represented by U.S. Army Research Laboratory.

πŸ’Œ BUG REPORTS πŸ’Œ

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org


Cute sign-off bestie: source/version is BRL-CAD, and the footer didn't give a date, so no invented date β€” just vibes and PIXBLEND(1), mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from