BW-PIX(1)
π BW-PIX(1) β the BRL-CAD glow-up zone β¨
okay so bestie, welcome to bw-pix, one of the BRL-CAD girlies π this whole page is about her, so grab a strawberry drink π and let's go
β¨ NAME β¨
bw-pix β the icon who converts a black and white image, or three color channels, into a color pix image π like she literally takes monochrome and gives it main character energy, no cap
π¦ SYNOPSIS π¦
bw-pix [-h] [-o _out.pix_] [_file.bw_ [_out.pix_]]
bw-pix [-h] [-o _out.pix_] _red.bw_ _green.bw_ _blue.bw_ [_out.pix_]
two whole forms, she's versatile like that π
π DESCRIPTION π
so bw-pix converts one or more black and white bw(5) files into a color pix(5) file. she's got two modes, and which one you get depends on how many input files you hand her. it's giving choose-your-own-adventure π§
Mode one: single input π β with a single input file (or when she's reading from standard input), each input value gets replicated three times, so all three RGB planes hold the same value. result? a grayscale image, but stored in pix format. same vibes, new container, periodt.
Mode two: three inputs π¦ β with three input files, they are read concurrently and treated as the red, green, and blue channels (in that order, iykyk) and their bytes are interleaved into a single color pix image. and here's the detail that matters: channels of unequal length are zero-padded to the length of the longest. so nobody gets left out ππ«Ά
output goes to the file named by -o, or to a final positional filename, or to standard output if neither is given. and the lowkey wild part: when an output file is named and standard output is also redirected, the result is written to both. two destinations, one queen π
with no input file at all? input is read from standard input. she's flexible fr fr.
πΈ OPTIONS πΈ
-o out.pixβ write the color pix output to out.pix. you can also just hand it over as the final positional argument instead, whatever feels right π« and if standard output is simultaneously redirected or piped, the same data is written to both destinations β yes bestie, both. don't say I didn't warn you π«Ά-h,βhelpβ print a usage message and exit. the classic "help me help you" moment, iconic, we love her β
π₯ EXAMPLES π₯
Example 1. Convert a grayscale image to pix
bw-pix moon.bw moon.pix
converts the grayscale image moon.bw into moon.pix, with the grayscale value copied into each of the red, green, and blue planes. one value, three homes, slay πβ¨
Example 2. Recombine separated color channels into a viewable image
bw-pix red.bw green.bw blue.bw | pix-fb
merges the three single-channel bw(5) files red.bw, green.bw, and blue.bw into a color pix(5) image and displays it on a framebuffer with pix-fb(1). this is genuinely useful when you're filtering individual color channels (for example with bwmod(1)) before recombining them π₯ like splitting the group chat and then putting it back together, no cap
π SEE ALSO π
brlcad(1), pix-bw(1), bwmod(1), pix-fb(1), pix(5), bw(5)
the whole friend group π go say hi
π AUTHOR π
BRL-CAD Team β legends, honestly π«Ά
β COPYRIGHT β
This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory. fr fr, that's the real text, keep it safe π
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org π§ if something's broken, tell the girlies, don't suffer in silence π
okay that's the whole page bestie, you're literally an expert now π β¨
remember: two modes, three channels max, and the output can go to two places at once β that's the vibe check β
signing off from the BRL-CAD corner of the universe π¦ this was BW-PIX(1) from BRL-CAD β version-and-date energy included, mwah ππ
π¦ 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