FB-BW(1)

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

πŸ’… FB-BW(1) β€” the BRL-CAD one, bestie

okay so picture this: you've got a framebuffer fulla pretty pixels and you want a black-and-white bw file out of it. that's literally it. that's the whole vibe. welcome to fb-bw, my beloved πŸŽ€


✨ NAME ✨

fb-bw β€” save a framebuffer image into a black and white bw file. no cap, that's the job πŸ–€πŸ€


🌸 SYNOPSIS 🌸

fb-bw [-h] [-i] [-F framebuffer] [-X scr_xoff] [-Y scr_yoff] [-s squaresize] [-w width] [-n height] [file.bw]

like, copy that, paste that, go off bestie πŸ’«


πŸ¦‹ DESCRIPTION πŸ¦‹

fb-bw grabs a region of a framebuffer display and saves it as a black and white bw(5) format file. that's the whole arc. main character behaviour tbh πŸ‘‘

so how does it turn colour into bw? it computes an equal blending of the red, green, and blue channels β€” three channels walk into a bar and split everything evenly, iconic. and if you need something fancier than that? the manpage itself says use fb-pix(1) and pix-bw(1) for more complex conversions. iykyk πŸ”₯

by default it's a first quadrant coordinate system (origin down in the lower left of the screen, cute little corner gremlin that it is), and the saved area starts from that origin. periodt. πŸ“


πŸ’– OPTIONS πŸ’–

  • -F framebuffer β€” explicitly name the framebuffer device. if you don't set it, the environment variable FB_FILE picks the display device instead (peep brlcad(1) for the lore). and if FB_FILE is also not set? you get the default device for the system. it's giving "we'll figure it out" πŸ™ˆ
  • -s squaresize β€” sets both the output file width and height to squaresize. square. symmetrical. balanced. we love a consistent queen ✨ the default size is 512x512 pixels.
  • -w width β€” sets just the output file width. width only, no notes πŸ’…
  • -n height β€” sets just the output file height. yes it's -n, not -h, don't @ me, -h is busy 🫢
  • -X scr_xoff β€” sets the starting X coordinate (offset) on the screen. where the grab begins, horizontally.
  • -Y scr_yoff β€” sets the starting Y coordinate (offset) on the screen. same energy, vertical axis πŸ¦‹
  • -i β€” switches to a fourth quadrant coordinate system (origin up at the upper left corner of the screen) instead of the default first quadrant (origin at the lower left). this changes both the origin offset coordinates and the storage order. it's a whole different origin story, lowkey 😭
  • -h / -? β€” prints a help message and exits. the "help me help you" option 🌈

πŸ“ EXAMPLES πŸ“

Example 1. Grab the current framebuffer and threshold it into a silhouette

fb-bw -F /dev/X -s 1024 | bwmod -m 4 -c | bw-fb -s 1024

what's happening here: it reads the entire 1024x1024 framebuffer, converts it to a single grayscale channel, then bwmod(1) brightens and clamps it to produce a high-contrast silhouette, and finally it displays the result right back on the framebuffer with bw-fb(1). a full round trip. a glow-up. we love a pipeline that eats πŸ”₯

Example 2. Save a specific region of the framebuffer to a file

fb-bw -X 256 -Y 256 -w 512 -n 512 region.bw

this bad boy captures a 512x512 region starting at screen offset (256, 256) from the default framebuffer and writes the grayscale result to region.bw. cropping but make it fashion βœ‚οΈπŸ’–


⭐ SEE ALSO ⭐

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

go read them. they're the supporting cast and honestly they ate πŸ‘‘


🧚 AUTHOR 🧚

BRL-CAD Team β€” legends, honestly 🫢


This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory. yes that's a real range, bestie, 1989 all the way to 2026 πŸ’€πŸ‘‘


πŸ”₯ BUG REPORTS πŸ”₯

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. found a gremlin? snitch. politely. via email πŸ“§πŸ’œ


ngl if something's weird, it's a bug not a feature β€” say it with your chest to devs@brlcad.org 😌

that's the whole page bestie!! this lovely lil thing comes to you from the BRL-CAD crew, FB-BW(1) and friends πŸŒˆπŸ’… sending you off with a kiss and a 512x512 default β€” mwah πŸŽ€

πŸ“¦ where this page comes from