FB-PIX(1)

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

πŸ’… fb-pix(1) β€” the BRL-CAD manual, bestie edition πŸŽ€

okay so real quick β€” this whole page lives in the BRL-CAD manual set, section 1, and it's about fb-pix. that's the name. that's the vibe. let's go ✨


✨ NAME ✨

fb-pix β€” save a framebuffer image as a color pix file πŸ–ΌοΈ


🌸 SYNOPSIS 🌸

fb-pix [-i] [-c] [-F framebuffer] [-s squaresize] [-w width] [-n height] [-h] [-?] [file.pix]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: fb-pix reads a region of a framebuffer and saves it as a pix(5) format file. that's literally the whole job. and if you don't give it an output file? no worries, it just writes the data to standard output. slay, honestly. πŸ’–

by default, the output size and the framebuffer size are both 512x512 pixels, with a first-quadrant coordinate system β€” meaning the origin sits at the lower left. iykyk. πŸ‘‘


πŸ’… OPTIONS πŸ’…

  • -i β€” use a fourth-quadrant coordinate system instead (origin at the upper left). this makes it read the framebuffer scanlines from top to bottom instead of bottom to top. flipped, but make it fashion. πŸ”„
  • -c β€” apply the framebuffer color map to the pixel values before writing. color correction era ✨
  • -F framebuffer β€” specify the framebuffer device. it defaults to the FB_FILE environment variable (peep brlcad(1) for the deets). πŸ–₯️
  • -s squaresize β€” set both width and height to squaresize. one number, two dimensions, zero stress. πŸŽ€
  • -w width β€” set the output width in pixels. πŸ“
  • -n height β€” set the output height in pixels. πŸ“
  • -h, -? β€” print a usage message and exit. the classic "help me help you" combo 🫢

πŸ”₯ EXAMPLES πŸ”₯

⭐ Example 1. Capture a rendered image and convert it to PNG

$ rt -s 1024 -F /dev/fb havoc.g havoc
$ fb-pix -s 1024 | pix-png -s 1024 > havoc.png

so what's happening here: it renders a model to the framebuffer with rt(1), saves the 1024x1024 framebuffer contents to a pix(5) stream on standard output, and pipes it straight into pix-png(1) to produce a PNG file. the pipeline is giving main character energy, no cap. πŸ’€βœ¨

🌈 Example 2. Save the framebuffer color map baked into the pixels

$ fb-pix -c -F /dev/ogl scene.pix

this one saves the image from the /dev/ogl framebuffer with the framebuffer color map applied to each pixel value, so the stored file reflects the displayed image even if a non-linear color map was loaded. baked in, literally. πŸ“


πŸ‘‘ SEE ALSO πŸ‘‘

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

go read them, they're all iconic in their own way 🫢


πŸ’œ AUTHOR πŸ’œ

BRL-CAD Team β€” the collective, the moment, the legends. 🧚


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

yes bestie, that's real, that's the actual line, keep it πŸ’…


πŸŽ€ BUG REPORTS πŸŽ€

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

found a bug? don't suffer in silence, tell the devs β€” email is right there, and they do want to know πŸ™ˆ

and that's the whole page, bestie πŸ¦‹ this iconic little number shipped as part of the BRL-CAD manual collection, and you just read fb-pix(1) in all its glory. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from