FB-PNG(1)
πΎ fb-png β the NAME bit π
okay so bestie, fb-png saves a framebuffer image as a Portable Network Graphics (PNG) file. that's the whole vibe. β¨
πΈ SYNOPSIS πΈ
fb-png [-i] [-c] [-# nbytes/pixel] [-F framebuffer] [-g gamma] [-s squaresize] [-w width] [-n height] [file.png]
π DESCRIPTION π
so fb-png literally reads a region of a framebuffer and saves it as a PNG (Portable Network Graphics) file. that's it, that's the girlboss move. π if you don't hand it an output file name, the data goes straight to standard output. no drama.
by default the region it reads is 512x512 pixels, in first-quadrant order (origin at the lower left, iykyk). wanna change the size? that's what -s, -w, and -n are for, bestie. and if the open framebuffer is smaller than the size you asked for? no worries β the region gets trimmed to fit. π«Ά
cute lil note: use png-fb(1) to display a PNG file in a framebuffer. the reverse slay.
β¨ OPTIONS β¨
-iβ reads the framebuffer bottom-to-top, inverting the image vertically (fourth-quadrant order, origin at the upper left). flip it, reverse it, iconic. π-cβ applies ("crunches") the framebuffer color map to pixel values before writing. if the framebuffer has no map, or has a linear one, this one just gets ignored. π-#nbytes/pixel β number of bytes per pixel:1for grayscale or3for color (color is the default, obvi π ).-Fframebuffer β specify the framebuffer device. defaults to theFB_FILEenvironment variable (peepbrlcad(1)for the tea β).-ggamma β writes the specified gamma correction value into the PNGgAMAchunk. a value of0.6approximates PC display monitors. a non-positive value (the default is-1.0) disables writing thegAMAchunk entirely. so like,-1.0= no gAMA chunk, at all, periodt.-ssquaresize β sets both width and height to squaresize pixels (default512). symmetrical queen. π-wwidth β sets the width in pixels (default512).-nheight β sets the height in pixels (default512).-h,-?β prints a usage message and exits. the classic "help me help you" moment π
π₯ EXAMPLES π₯
Example 1. Render a model and capture the framebuffer to PNG
rt -s 1024 -F /dev/X moss.g all.g &
fb-png -F /dev/X -s 1024 moss.png
ray traces the moss.g model into a 1024x1024 X11 framebuffer with rt(1), then grabs that framebuffer and saves it as a PNG image of the exact same size. matching the -s size to the framebuffer is the whole trick β it ensures the entire image gets captured. no crumbs left behind. π
Example 2. Save the lower-left quadrant of the default framebuffer
fb-png -w 256 -n 256 crop.png
reads only a 256x256 region (anchored at the origin) from the framebuffer named by the FB_FILE environment variable, and writes it to crop.png. tiny, precious, a lil snack. π§
π¦ SEE ALSO π¦
brlcad(1), png-fb(1), fb-bw(1), pix(5)
π AUTHOR π
BRL-CAD Team β legends, honestly.
π COPYRIGHT π
This software is Copyright (c) 1998-2026 by the United States Government as represented by U.S. Army Research Laboratory. (yes, the whole range, 1998 all the way to 2026, fr fr.)
β BUG REPORTS β
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. tell 'em you sent the bugs, not the vibes π
anyway that's the whole page bestie β brought to you by the BRL-CAD girlies, FB-PNG(1) energy, dated somewhere in the 1998-2026 copyright era. now go capture that framebuffer, you absolute main character. π
β¨π
π¦ 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