PIXDIFF(1)
β¨ 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
π COPYRIGHT π
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
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms