PNG-FB(1)

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

πŸ¦‹ png-fb β€” the BRL-CAD manual page, but make it make sense ✨

okay so bestie, welcome to png-fb(1) πŸ’… this is the little icon that takes your PNG and drops it straight onto a framebuffer. no cap, it's giving "just show me the picture."


✨ NAME ✨

png-fb β€” display a PNG image file on a framebuffer πŸ–ΌοΈ


πŸŽ€ SYNOPSIS πŸŽ€

png-fb [-H] [-i] [-c] [-v] [-z] [-1] [-m #lines] [-F framebuffer] [-g screen_gamma] [-S squarescrsize] [-W scr_width] [-N scr_height] [-x file_xoff] [-y file_yoff] [-X scr_xoff] [-Y scr_yoff] [file.png]

πŸ’– DESCRIPTION πŸ’–

so png-fb reads a Portable Network Graphics (PNG) format image from the named file β€” or from standard input if you don't hand it a file at all β€” and then displays it on the currently selected framebuffer. that's the whole vibe 🫢

the environment variable FB_FILE selects the default framebuffer (peep brlcad(1) for that), and the -F option overrides it. yes, -F wins. always. periodt.

if no screen size is requested, the framebuffer is opened to match the size of the input image β€” it just fits, no drama ✨. Grayscale and palette-based images are expanded to RGB, and 16-bit samples are reduced to 8 bits. so your fancy depth gets squished down to 8 and honestly it's fine.

the reverse conversion β€” writing a framebuffer image out to a PNG file β€” is performed by fb-png(1). that's the other direction, iykyk πŸ”


🌸 OPTIONS 🌸

  • -H β€” Print a single line on standard output giving the image dimensions in a form usable in shell scripts (e.g. WIDTH=42 HEIGHT=17) and exit without displaying the image. literally just the facts, no picture πŸ”₯
  • -i β€” Invert the image, drawing it upside-down. main character energy, but flipped πŸ™ˆ
  • -c β€” Clear the framebuffer to black before displaying. By default the new image is written over whatever is already on the screen, so if you want a clean slate you gotta ask for it πŸ’€
  • -v β€” Be verbose, reporting the color type, bit depth, image size, gamma, interlace status, and any embedded text or modification-time chunks. she's nosy and we love her πŸ‘‘
  • -z β€” Zoom and center the image so it fills the display area, using the framebuffer fb_view() routine. Only integer zoom factors are available, so non-square displays may find this of limited use. lowkey a niche tool but ok ✨
  • -1 β€” Force the image to be written one scanline at a time with fb_write(3). This is the default and overrides -m. the classic, the original, the icon πŸ’…
  • -m #lines β€” Write the image in rectangular blocks of #lines scanlines using fb_writerect(3) rather than one line at a time. This can be significantly faster on some framebuffers. Block writes are only used when the image is not inverted or zoomed and is no wider than the screen; otherwise display falls back to single-line writes. so it's fast but picky, and it will absolutely bail on you if conditions aren't met 🧚
  • -F framebuffer β€” Display on the explicitly named framebuffer instead of the one named by FB_FILE. overrides the env var, as promised πŸ¦‹
  • -g screen_gamma β€” Additional gamma correction to apply for the display screen (default 1.0, i.e. none). Larger values produce a lighter image. ✨
  • -S squarescrsize β€” Set both the framebuffer width and height to squarescrsize pixels. one number, two dimensions, square supremacy πŸŽ€
  • -W scr_width β€” Set the framebuffer width, in pixels.
  • -N scr_height β€” Set the framebuffer height, in scanlines.
  • -x file_xoff β€” Skip file_xoff pixels into the image horizontally before displaying.
  • -y file_yoff β€” Skip file_yoff pixels into the image vertically before displaying.
  • -X scr_xoff β€” Offset the displayed image scr_xoff pixels horizontally on the screen.
  • -Y scr_yoff β€” Offset the displayed image scr_yoff pixels vertically on the screen.
⚠️ heads up bestie: the coordinate system for the offsets is first quadrant, with the origin at the lower left corner of the image. not upper left. don't come for me, that's just how it is 😭

🌈 EXAMPLES 🌈

Example 1. Render a model and display the result

rt -o render.png -w 1024 -n 1024 havoc.g havoc
png-fb -c render.png

Ray-traces a geometry database to a 1024x1024 PNG file with rt(1), then clears the framebuffer and displays the rendered image. render β†’ clear β†’ flex. iconic behavior honestly πŸ”₯

Example 2. Probe an image size from a script

eval $(png-fb -H earth.png)
echo "image is ${WIDTH} by ${HEIGHT}"

Uses -H to read back the dimensions of a PNG without displaying it, capturing them as shell variables for further processing. script girl summer 🫢


⭐ SEE ALSO ⭐

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


πŸ‘‘ AUTHOR πŸ‘‘

BRL-CAD Team πŸ’œ


This software is Copyright (c) 1998-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 β€” yes, actual email, we're old school like that πŸ“§


and that's the whole page, bestie 🧚 this one ships with BRL-CAD and answers to the name PNG-FB(1) β€” go forth and put pixels on screens βœ¨πŸŽ€πŸ’–

πŸ“¦ where this page comes from