PIX-FB(1)

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

🌸 NAME 🌸

pix-fb β€” display a pix format RGB image on a framebuffer

okay so this is pix-fb(1), straight out of the BRL-CAD manual set. The (1) means general commands, iykyk. Bestie, it literally just puts a pix image on your screen. That's it. That's the whole slay. πŸ’…

✨ SYNOPSIS ✨

pix-fb [-a] [-i] [-c] [-z] [-1] [-m #lines] [-F framebuffer] [-s squarefilesize] [-w file_width] [-n file_height] [-S squarescrsize] [-W scr_width] [-N scr_height] [-x file_xoff] [-y file_yoff] [-X scr_xoff] [-Y scr_yoff] [-p seconds] [file.pix]

πŸ¦‹ DESCRIPTION πŸ¦‹

pix-fb reads a pix(5) format RGB image from the named file β€” or from standard input if you don't give it a file β€” and displays it on a framebuffer. The framebuffer defaults to the device named by the FB_FILE environment variable (peep brlcad(1) for that one) and you can override it with -F. main character energy fr fr.

A pix(5) file stores each pixel as three unsigned char bytes (red, green, blue), with the first pixel chillin' at the lower-left corner. Scanlines run left-to-right, bottom-to-top. By default the image is assumed to be 512x512 pixels, and the framebuffer is opened at the file's dimensions unless you explicitly ask for a screen size. No cap.

Wanna go the other direction β€” save a framebuffer image out to a pix(5) file? That's fb-pix(1)'s job, bestie. Different tool, different vibe. 🫢


πŸŽ€ OPTIONS πŸŽ€

  • -a β€” Autosize the input. It compares the file's byte count against a table of common image dimensions and uses the matching width and height. Needs file input β€” a pipe will NOT work here, so don't even try it. πŸ™ˆ
  • -i β€” Invert the image, displaying it top-to-bottom. Since pix(5) files are stored bottom-to-top, this literally turns the image upside down. πŸ’€
  • -c β€” Clear the framebuffer before displaying. By default the new image just overwrites whatever's already on screen β€” no clearing, no goodbye, no nothing.
  • -z β€” Zoom and center the image to fill the display, using integer zoom factors via the libfb fb_view() routine. She fills the frame, periodt.
  • -1 β€” Force one scanline per write using fb_write(3). This is the default and it overrides -m. The classic. The blueprint. 🌟
  • -m #lines β€” Write the image in rectangular blocks of #lines scanlines using fb_writerect(3). Can be significantly faster on some framebuffers. Only used in the simplest non-inverted, non-zoomed, full-width case β€” so don't expect it everywhere.
  • -F framebuffer β€” Use the named framebuffer device instead of the one given by FB_FILE.
  • -s squarefilesize β€” Set both the input width and height to squarefilesize pixels (disables autosizing).
  • -w file_width β€” Set the input scanline width, in pixels (disables autosizing).
  • -n file_height β€” Set the input height, in scanlines (disables autosizing).
  • -S squarescrsize β€” Set both the screen width and height to squarescrsize pixels.
  • -W scr_width β€” Set the screen width, in pixels.
  • -N scr_height β€” Set the screen height, in pixels.
  • -x file_xoff β€” Skip file_xoff pixels in from the left edge of the input. Origin is the lower-left corner, bestie.
  • -y file_yoff β€” Skip file_yoff scanlines up from the bottom of the input.
  • -X scr_xoff β€” Offset the image scr_xoff pixels horizontally on the screen (may be negative β€” yes, negative is allowed, she goes both ways πŸ’…).
  • -Y scr_yoff β€” Offset the image scr_yoff pixels vertically on the screen (may be negative too).
  • -p seconds β€” Pause seconds seconds before closing the framebuffer and exiting. So it doesn't vanish on you mid-look. 😭

πŸ”₯ EXAMPLES πŸ”₯

Example 1. Render and display a model

rt -o moss.pix -w 1024 -n 1024 moss.g all.g
pix-fb -F /dev/X -a moss.pix

Ray traces the all.g object from the moss.g database into a 1024x1024 pix(5) image, then displays it on an X11 framebuffer. The -a flag autosizes from the file, so you don't gotta repeat the explicit dimensions. ate. πŸ‘‘

Example 2. Pause so the result stays visible

pix-fb -w 512 -n 512 -p 5 render.pix

Displays a 512x512 image and keeps the framebuffer open for 5 seconds before closing. Super useful in scripts, or for pop-up framebuffers that would otherwise vanish immediately β€” like, rude. 🌈


πŸ‘€ SEE ALSO πŸ‘€

brlcad(1), fb-pix(1), png-fb(1), rt(1), libfb(3), pix(5)

Go read them, bestie. All of them. 🧚

πŸ’– 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. Be nice about it, they're doing their best 🫢


one last thing β€” this gorgeous little page came from the BRL-CAD set, and the manpage name is PIX-FB(1), lowercase-famous. mwah πŸ’‹
πŸ“¦ where this page comes from