PIXDIFF(1)

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

✨ PIXDIFF(1) ✨

okay so this is a page from the BRL-CAD manual set, and the tool is literally called pixdiff β€” yes bestie, we're diffing .pix files today πŸ’…


πŸŽ€ NAME πŸŽ€

pixdiff β€” highlights the pixel colors that differ between two pix files. it's giving "spot the difference" but make it Unix 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

pixdiff _file1.pix_ _file2.pix_ > _out.pix_

πŸ’– DESCRIPTION πŸ’–

so pixdiff takes two color pix(5) format images and compares them pixel by pixel, then writes a brand-new pix(5) image to standard output that highlights exactly where they differ. main character energy fr πŸ‘‘

here's the tea per pixel: if any of the red, green, or blue channels differ, those differing channels get specially marked β€”

  • bytes that differ by +/-1 are written at intensity 192
  • bytes that differ by more are written at full intensity 255

and where a pixel matches exactly? you get its NTSC black-and-white equivalent at half intensity written instead, which gives you visual context so you can actually locate the differences inside the image. thoughtful icon behavior honestly 🫢

because the comparison is per pixel, pixdiff is independent of image resolution β€” no cap. but heads up: the two inputs must be the same size in bytes, otherwise the program reports the mismatch and exits. that's the vibe check and it will fail you 😭

either input file may be given as - to read from standard input. oh and output must be redirected β€” pixdiff flat-out refuses to write a pix(5) stream to a terminal. it's protecting you, bestie πŸ™ˆ

upon completion, the count of bytes that matched, that were off by 1, and that were off by many is reported on standard error. numbers! love that for us πŸ“Š

also go see bwdiff(1), which can also operate on pix(5) files and can produce other kinds of difference output. options, we stan ⭐


πŸ”₯ EXAMPLES πŸ”₯

Example 1. Diff two renderings and view the result

pixdiff frame_a.pix frame_b.pix > diff.pix
pix-png -w 512 -n 512 diff.pix > diff.png

this compares two 512x512 renderings, writing a highlight image to diff.pix, then converts it to PNG with pix-png(1) for easy viewing. differing channels glow brightly against a dim grayscale backdrop, making changed regions easy to spot β€” literally iconic ✨ and the matching/off-by-1/off-by-many byte counts printed on standard error give you a quick quantitative sense of how much changed. slay πŸ’…


🌈 SEE ALSO 🌈

brlcad(1), bwdiff(1), pix-fb(1), pix-png(1), pixstat(1), pix(5)

all the besties in the same friend group πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team


This software is Copyright (c) 1989-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 β€” tell them everything, they want the details πŸ“¬


okay that's the whole page, no notes πŸ’– this one's from the BRL-CAD crew, page PIXDIFF(1) of the manual β€” go forth and diff those pixels, bestie πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from