PNG-FB(1)
π¦ 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 framebufferfb_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 withfb_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 usingfb_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 π§-Fframebuffer β Display on the explicitly named framebuffer instead of the one named byFB_FILE. overrides the env var, as promised π¦-gscreen_gamma β Additional gamma correction to apply for the display screen (default1.0, i.e. none). Larger values produce a lighter image. β¨-Ssquarescrsize β Set both the framebuffer width and height to squarescrsize pixels. one number, two dimensions, square supremacy π-Wscr_width β Set the framebuffer width, in pixels.-Nscr_height β Set the framebuffer height, in scanlines.-xfile_xoff β Skip file_xoff pixels into the image horizontally before displaying.-yfile_yoff β Skip file_yoff pixels into the image vertically before displaying.-Xscr_xoff β Offset the displayed image scr_xoff pixels horizontally on the screen.-Yscr_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 π
π COPYRIGHT π
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
- 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